Hi,
I have a swf which I load using a customized swf loader. The problem I'm
facing is after I load the swf, I want to tell one of its symbol to do an
action. But this does not seem to work . Any word on that?
___
Flashcoders mailing list
hi,
are you programming in AS2 or AS3?
From: akhter.fa...@gmail.com
Date: Tue, 9 Mar 2010 13:59:35 +0500
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Accessing Symbol inside of loaded SWF
Hi,
I have a swf which I load using a customized swf loader. The problem I'm
No you can't reference something that is not ther yet.
You need to add an eventlistener to imageloader to listen for the
loading to complete.
Inside that event listener you can call
imageLoader.content.testMovie.gotoAndStop(2)
HTH
Willem van den Goorbergh
ps please post your questions to 1
Willem,.
Here is the full scenario. I have a swfLoading class which loads SWF for me.
Once the swf is loaded say a ball. I want to click on different colors and
change the color of the stripes on the ball.
Now, with what you said I can access things once they are loaded. The load
complete
I'm using AS3 here is a little more detail.
I'm loading an swf say test.swf which gets loaded in imageLoader , so I
can get its content by :
imageLoader.content
So if I wanted one of the movieClips inside it I would do this :
imageLoader.content.testMovie.gotoAndStop(2);
But when I do
Basically the myLoadedSwf is a child of a class called LoadingClass , if I
access myLoadedSwf.myBall.myStripeToReColor inside that class it works.
But when I make an instance of the class and myLoadedSwf is a child in that
class. I'm unable to reference the child
var testLoader:LoadingClass =
Finally got it solved. Created new movieClip referenced it to the exact
object I needed and made it public in the loader class. Created an event
listener to listen for the end of Complete Load and dispatch another event
which is caught by the outside class which changes the color :)
Thanks a lot
You would probably want to either set a flag, or store a variable in
your class / outside your event handler function that is null before the
content is loaded. In other functions that manipulate that clip, you
should test that the variable is not null before manipulating it.
Alternatively,
Another correction :
basically its not imageLoader.content.testMovie.gotoAndStop(2); but I want
to transform the color of testMovie which is an movieClip inside the loaded
SWF
On Tue, Mar 9, 2010 at 4:12 PM, Fahim Akhter akhter.fa...@gmail.com wrote:
I'm using AS3 here is a little more detail.
Oké, now I understand,
In that case you have to make sure that the user can click only when
the ball is loaded.
I guess you have an eventListener somewhere that listens for users to
click.
When you trace for the ball in that eventlistener, do you get the
expected reference to it?
Maybe your
testVar.ball.myStripeToReColor.transform can be written as
testVar.someMovieClip.myStripeToReColor.transform
On Tue, Mar 9, 2010 at 7:11 PM, Geografiek geograf...@geografiek.nl wrote:
Fahim,
I think testVar already references 'ball'
so testVar.ball in your last line is wrong.
HTH
Willem
So, what's your problem?
On 9-mrt-2010, at 15:33, Fahim Akhter wrote:
testVar.ball.myStripeToReColor.transform can be written as
testVar.someMovieClip.myStripeToReColor.transform
On Tue, Mar 9, 2010 at 7:11 PM, Geografiek
geograf...@geografiek.nl wrote:
Fahim,
I think testVar already
I posted it on flexcoders accidently. Then had to update the question there
too. I apologize for that.
Hmm what if I do not want to reference it from inside that event
Listener but a another movie clip who would be later its parent?
On Tue, Mar 9, 2010 at 4:24 PM, Geografiek
Hi Fahim,
Can be anything.
To give you something to proceed we really need more information.
What are you doing exactly? (what is the code you use to tell the
symbol to do an action)
What would you expect to happen?
What is actually happening (error codes etc.)
Willem van den Goorbergh
On
Hi Fahim,
I'm afraid I don't understand your question. What are you trying to
accomplish?
afaik this is not a matter of 'wanting to'. You just have to wait to
address something until it is loaded.
Willem
On 9-mrt-2010, at 12:51, Fahim Akhter wrote:
I posted it on flexcoders accidently.
Fahim,
I think testVar already references 'ball'
so testVar.ball in your last line is wrong.
HTH
Willem van den Goorbergh
On 9-mrt-2010, at 14:36, Fahim Akhter wrote:
Basically the myLoadedSwf is a child of a class called
LoadingClass , if I
access myLoadedSwf.myBall.myStripeToReColor inside
16 matches
Mail list logo