gotoAndPlay from mc to main timeline
I'm trying to play a frame label that is on the main timeline by clicking on a button inside of a movieclip.
Here is the error I'm getting. I most definitely have a page1 label on the frame.
Code:
ArgumentError: Error #2109: Frame label page1 not found in scene Scene1.
at flash.display::MovieClip/gotoAndStop()
at site_fla::Navbarslider_5/btn1()
Here is my button code:
Code:
button1.addEventListener(MouseEvent.CLICK,btn1);
function btn1(e:MouseEvent):void {
MovieClip(parent).gotoAndStop("page1");
}
Any help is appreciated.
yea so I tried all that and it's the same error when applied to my swf.
I'm attaching my fla so if you get a chance to look at it that'd be awesome..
The button code is in the navslider mc on the first frame.
Attached Files
change it from
MovieClip(parent).gotoAndStop("page1");
to
(root as MovieClip).gotoAndStop("page1");
Tried that many moons ago. It's just not finding the clearly visible frame label and it's pissing me off.
and it's still giving you that error??that's weird. did you name the frame properly in the main stage?
Yes it is labelled properly, and the frame labels I have in the mc work fine but it wont go to any on the main timeline..
Originally Posted by
loganbest
Yes it is labelled properly, and the frame labels I have in the mc work fine but it wont go to any on the main timeline..
did you check all your labels if you have them properly and they are being called in the right place
if that stilll giving you error, send me a simple attached file that i could run to test it. i couldn't run your attached file becus it's missing some files.
so now the weird thing is, I think flash doesn't like the label "page1" because I changed it to something else and it works fine...
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