ActionScript 3.0 :: Access An External Swf?
Nov 2, 2011I am trying to just access a movieclip in the timeline from an external swf , it likes a button when I press it another swf load in the parent swf. [code]...
View 4 RepliesI am trying to just access a movieclip in the timeline from an external swf , it likes a button when I press it another swf load in the parent swf. [code]...
View 4 RepliesI am trying to access a function in a loaded swf that has external class.. I would like to avoid having to put the function on my "Main" Doc class in the external swf and instead access the function directly from the class
This is what ive tried so far and it's a no dice:
private function startLoad(){
var loader:Loader = new Loader();
var req:URLRequest = new URLRequest("one.swf");
[Code]....
I'm trying to access the childrens from an external swf previous loaded. This swf is a movieclip exported as swf which has two movieclips inside also.It loads the movieclip, but when I try to access to his childs, there is no one. What I'm doing wrong? I'm missing something when I export or load in AS3? I'm loading the swf as:
itemLoader = new Loader();
itemLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, itemLoaded);
itemLoader.load(new URLRequest("path"));[code].....
I want to create an array and fill it with a bunch of stuff, but its getting too crowded in my document class..can I just create a class of 'data', ie variable declarations and arrays, and then reference that from the document class?
View 4 RepliesAccess Objects from a external .swf i loaded a flash mx movie into a flash 8 movie, and now i need to detect if a button of the loaded movie is pressed but i simply dont know how.
i used:
Code:
var news_mcl:MovieClipLoader = new MovieClipLoader();
news_mcl.loadClip("source.swf", newscontainer_mc);
to load the movie, and i have a movieclip inside it with the instance name "read", and i need the code to put in the parent movie (the flash 8 one) to detect a onRelease on that "read" movieclip.
I have an MovieClip on Stage with instance name main_mc. I am loading an external game.swf in that main_mc. I want to access variables of root through game.swf. I have used loadMovie() to load the external swf.
View 5 RepliesSo I have a class that reads from an external XML file, and it works great. (uses RLRequest and complete event listener)I have functions in it to read certain parts of the file.Im trying to create a new instance of that class in my document class. I am able to do this, BUT because the XML class loads the file, and uses a complete event listener to load it, anything I try to access (var or function) come up blank because it fires before the file is done being loaded.Id like to be able to do something like this.
Code:
var prefs:XMLClass = new XMLClass();
var localcolor:uint = prefs.color; (access the public variable color)
[code]....
I have a swf file which contains in its library couple pictures.After it is loaded using preloader I would like to be able to create couple instances of them and add them to the stage.If I use swc approach and import it in library path I can not preload it but instancing is very simple i.e [code]How to access them when doing it with swf and loader class?
View 1 RepliesI've a website in which i have a menu that handle some external swf.My Problem is that when i've clicked on one section of the website and then i click on another menu button to gain access on another section i wanna to make an "go out transition" for the current loaded section. This transtion must be different for every website section, so for this i'm going to create a "go out transition" in every external swf class that i have for every section.Now my question is: How can i access from the main class to every single classes of the section to obtain the properly "go out transition" ?
View 9 RepliesHow would I access a loaded in swf files public methods in my main swf.
var temp:ExternalSWFLoader = new ExternalSWFLoader("FX_Ticker.swf");
temp.x=temp.y=0;
Ticker =(Sprite)(temp);
[Code]......
how to access functions on my main SWF file from a loaded SWF file?
View 13 RepliesI'm developing an android file by using flash cs5 air extention. I know the basic crossdomain policy and server to server connections. And I searched many pages but there is no solution about this.
My "container.apk" loads "external.swf" from the server.. And I want to be able to reach the variables and functions in "container.apk" from "external.swf". But I can't reach any function on my container (application file .apk) from my external module swf (remote file).. I mean, I'm trying to reach container.apk's functions from the loaded swf. Like when a button clicked on "external.swf" it should effect a function in "container.apk".
Also here are some error codes that I'm getting ;
[Code]...
Is it possible to access a movieclip inside an external swf (.fla file), using data from a vector?
The following code works correctly:
this._graphics.message2_mc.textLabel_txt.text = "Test";
Where as when I loop through a vector and try to replace "message2_mc" it cannot find the movie clip:
for(var i:uint = 1; i <= this._playlistState.subMovieVector.length - 1; i++)
{
var movieName:String = this._playlistState.subMovieVector[i].movieName;
this._graphics.movieName.textLabel_txt.text = "Test";
}
Presumably this is because I am putting a string in the middle of the line of code accessing the movie clip?
I have a doubt about access functions between an MAIN fla and his external Movie.
All I need is to return a variable to the MAIN.fla function as TRUE.[code]...
No matter what I try to access this swf..._root, _parent, _level0, etc...I can't get to it. I did a targetPath and it returned "level0"...so I'm not sure what I'm missing.
Code:
var player1holder:MovieClip = _root.createEmptyMovieClip("player1holder", 0);
var player1loader:MovieClipLoader = new MovieClipLoader();
[code].....
This situation is rather tricky because I'm having to control movieclips/properties in both the Parent and Child SWFs.
The path I took was not to have a slave document in the loaded SWF as it was looking for all the library movieclips I was referencing in the Parent. I didn't know how to resolve that easily, so I decided to to refer to the Loaded SWF movieclips using an instance of the class onComplete[code]...
I'm working on a game. Yep. I have the main class where I control all the stuff that's packed in external classes. My current issue is that I listen for a mouse event to happen, and when the left button is pressed, I add a child to the stage.[code]...
However, I want to set all the stats of the bullet in an external class called "Rock". In the main class I just attach a movieclip to the stage, and the behavior of this MC is supposed to be controlled by the Rock class. The problem is I dont know how to access the bullet variable from the Rock class.
I have a folder with my .fla, and a folder called "classes" where I stored all my classes. I'm trying to access a MC in the .fla file so that I reference it from one of those classes in the "classes" folder. for you visual learners...
Code:
<project>
project1.fla <- library here
[code].....
I have a number of actionscript 3.0 external script files in my game. They all contain functions that do various stuff like "load level buttons" and "go to selected level". I have a different external script file for each function. How do I link to those files and run the functions inside them.
View 3 RepliesAll I need is to acess the External Movies functions, variables and the External MAIN TIMELINE to control the loaded content.
How do I do that?
I've traced the content just to give a better idea about my Structure[code]...
I'm working on what might be called my first OOP project using AS3. I have no prior programming experience and I'm just starting out learning AS3. So here's my question - The project FLA file has no graphics on its timeline. All the graphics are imported externally through a display class which loads several .swf files onto the main stage. In one of these .swf files there is a MovieClip instance (which is functioning as a mask) by the name of viewArea_mc.
Now I'm working on a new class which has something to do with graphics that will be revealed through the viewArea_mc mask (mentioned above). My question is basically how do I address this viewArea_mc object from this new class? Let's say this new class is a kind of container whose width and height are dependent on the width and height of viewArea_mc. How do I address those properties of viewArea_mc? For example, say I have a variable in this new class called container. Why is this code giving me an error?
Code:
Select allvar container:Sprite = new Sprite;
container.width = 2 * viewArea_mc.width;
The error I get is:
Access of undefined property viewArea_mc
my main application is a sprite heres my code:
package {
import flash.display.Sprite;
import flash.display.Loader;
import flash.events.Event;
[code]...
when my main app is a MovieClip (extends MovieClip) is working.but my main app is a sprite i take this message cannot convert ROOT@16b26df1 to flash.display.MovieClip.can i change this line
MovieClip(this.parent.parent).traceMe();
to something like this Sprite(this.parent.parent).traceMe();
I am using Action Script 3.I have loaded some xml data using an external as file called importxml.as.If I put a trace statement in it to access the content it works perfectly.But how do I access the data from the Flash main timeline or from another as file?I am using the statement ïż½import xmlimportïż½ but if I then write:trace(xmldata.category[1].word[1].text); I get the message;
1120: Access of undefined property xmldata.
If I try this on the main timeline
var myXMLmlimport=new xmlimport();
I get the error message
TypeError: Error #1010: A term is undefined and has no properties.
I am loading an external swf into my main swf. From my main swf I am trying to access a movieclip inside the external swf.
My code:
Code:
trace(contentLoader.getChildByName("mask_mc").y);
trace(contentLoader.getChildByName(event.target.mask_mc.name).x);
(contentLoader is my loader, the mc iam trying to access is mask_mc)
have an external class which controls about 400 buttons. But I want this class to also be able to show a Popup window. But this would mean I would need to access the Library.Within this library would be a MovieClip exported for Actionscript with the name PopUP.WITHIN the fla it's easy:PHP Code:va popUpWindow:PopUP = new PopUP();addChild(popUpWindow);
View 4 RepliesWhen I compiled the following code I had some problem.[code]...
View 12 RepliesThe problem: how can I get access to instance items after an external swf loaded?[code]...
View 2 RepliesI have an external as file.I was wondering what I put in it to update a textField I have manually drawn on the stage? so what I'd normally put in the timeline is:
myField.text = 'tester';
what would you put in an exteranl as file, and do I need to include:
import flash.display.MovieClip;
import flash.display.Stage;[code]....
From an HTML form, I wish to launch my existing working flex application passing in parameters E.G, login details.[code]...
View 1 Repliesafter loading an external movie clip called "mv_frame" into the main flash file , i need to access a movie clip inside the loaded movie called "hit" in as2 we do that using the point (.) to navigate into movie levels , but my question is how to do that in AS3?
View 2 Replies