atjkan
May 30th, 2008, 10:44 AM
Hi guys, I'm really quite new to actionscript let alone AS3, hopefully you can help me out with an issue I'm having.
I have a movieclip with instance name "Title" within my main timeline. I want to jump to a frame within "Title" labelled "Appear" whenever the playhead reaches a certain frame on the main timeline.
In AS2 I would have gone with onEnterFrame, but I'm not sure what to do with AS3. Here's what I've attempted, but it doesn't seem to work:
addEventListener(Event.ENTER_FRAME,myFunction);
function myFunction(event:Event) {
trace("MovieClip(root).Title.gotoAndPlay(Appear)");
}
removeEventListener(Event.ENTER_FRAME,myFunction);
Any help you could give would be great.
Thanks!
I have a movieclip with instance name "Title" within my main timeline. I want to jump to a frame within "Title" labelled "Appear" whenever the playhead reaches a certain frame on the main timeline.
In AS2 I would have gone with onEnterFrame, but I'm not sure what to do with AS3. Here's what I've attempted, but it doesn't seem to work:
addEventListener(Event.ENTER_FRAME,myFunction);
function myFunction(event:Event) {
trace("MovieClip(root).Title.gotoAndPlay(Appear)");
}
removeEventListener(Event.ENTER_FRAME,myFunction);
Any help you could give would be great.
Thanks!