Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Problem to play mc at frame 1

Participant ,
Oct 09, 2013 Oct 09, 2013

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

TOPICS
ActionScript
921
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 09, 2013 Oct 09, 2013

attach a stop() to frame 1 of your external clip.  after loading is complete, execute a play().

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 09, 2013 Oct 09, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 09, 2013 Oct 09, 2013
LATEST

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()

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines