Copy link to clipboard
Copied
Hi!
on the main stage I have 2 clips 'mc' and 'bttn'. inside 'bttn' there is a button located at frame 356.
when it click it call a function to load an external clip into root into 'mc'.
external clip runs after click the button but it doesn't starts at frame 1, but rather it already stop at the end frame.
I tried several things like mc.gotoAndPlay(1); etc, but nothing work it just always starts from the end frame.
I think it has to do that button is located at frame 356 and the external clip only has 30 frames so by the time button is clicked it's already far away from where external clip stops
but how do i fix this?
thank you
Copy link to clipboard
Copied
attach a stop() to frame 1 of your external clip. after loading is complete, execute a play().
Copy link to clipboard
Copied
I tried that, put a stop() on frame 1, and then in the main stage I have these
var appRequest:URLRequest = new URLRequest("001_createapp.swf"); //external clip
var appLoader:Loader = new Loader();
appLoader.load(appRequest);
newAcc.addEventListener (MouseEvent.CLICK, signInFunc);
function signInFunc (e:MouseEvent):void {
MovieClip(parent.parent.parent.parent).subMc.removeChildAt(0);
MovieClip(parent.parent.parent.parent).subMc.addChild(appLoader);
MovieClip(parent.parent.parent.parent).subMc.gotoAndPlay(1); //subMc the main mc clip go to
MovieClip(parent.parent.parent.parent).mainMc.removeChildAt(0);
MovieClip(parent.parent.parent.parent).mainMc.removeChildAt(0);
MovieClip(parent.parent.parent.parent).mainMc.removeChildAt(0);
MovieClip(parent.parent.parent.parent).prodInfo.removeChildAt(0);
MovieClip(parent.parent.parent.parent).prodInfo.removeChildAt(0);
}
it still stops at frame 1 and thats it
Copy link to clipboard
Copied
if 001_createapp is the movieclip stopped at frame 1:
var appRequest:URLRequest = new URLRequest("001_createapp.swf"); //external clip
var appLoader:Loader = new Loader();
appLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadcompleteF);
appLoader.load(appRequest);
function loadcompleteF(e:Event):void{
MovieClip(appLoader.content).play()
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now