0
Triggering a simple action with an enter_frame event
Community Beginner
,
/t5/animate-discussions/triggering-a-simple-action-with-an-enter-frame-event/td-p/2125798
Sep 09, 2009
Sep 09, 2009
Copy link to clipboard
Copied
I'm struggling to move from AS2 to AS3 and trying to mimic an old AS2 trick. When the playhead hits a frame on my mc's timeline with this code:
_root.gotoAndPlay("3");
the main/root/parent timeline would go to frame 3. Clean, short, simple. How can I do this in AS3?
I've tried this code but it didn't work:
this.addEventListener(Event.ENTER_FRAME, proceedNow);
function proceedNow(event:Event){
//parent.nextFrame();
parent.gotoAndPlay("3");
}
I must be going about this the wrong way…
TOPICS
ActionScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/animate-discussions/triggering-a-simple-action-with-an-enter-frame-event/m-p/2125799#M43503
Sep 09, 2009
Sep 09, 2009
Copy link to clipboard
Copied
MovieClip(root).gotoAndPlay(3); // p.s. in as2 and as3 you should not start a frame label with a number.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

