-
have UILoaded swf talk to parent
I have a main fla that will load many external swfs sequencially in a timeline, two frames for each. The main timeline will advance only one frame, play the newly loaded swf and wait. I want each swf to tell the parent when it is done playing, and advance the parent to the next frame where there will be a next button and a replay button. I figured that I need an event listener in the parent, but how do I write the code for the child? I plan to have all loaded swfs coming from an images folder, and that part works fine
tahnks in advance for any help
-
Prid - Outing
I'm not sure what version of actionscript you're using, but in AS2, you can refer to the main swf from a child swf using the scope _root
Like, inside your child swf, you use something like: root.nextFrame(); or something like that.
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
solution
used this for the child:
stage.dispatchEvent(new Event("cComplete"));
and this in the parent:
stage.addEventListener("cComplete",slideCompleteHd lr);
function slideCompleteHdlr(e:Event):void{
this.nextFrame();
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|