Problem with ActionScript 3.0 button to URL and root movieclip

Posted by aarontb on Stack Overflow See other posts from Stack Overflow or by aarontb
Published on 2010-04-18T14:31:45Z Indexed on 2010/04/18 14:33 UTC
Read the original article Hit count: 352

Filed under:
|

Okay, so, here's what the problem is. I'm creating a flash site with each page being it's own movieclip and Scene 1 being the menu and other things that stay on the site.

I've created a MovieClip called 'HowWorksScene'. The movieclip has 2 buttons that link out to different URLs, however, I'm sure that when 1 of the button scripts work, the same script will work for the other...so here's the problem that I'm having with the Button
stop();
VidDemo_btn.addEventListener(MouseEvent.CLICK, video);
function video(event:MouseEvent):void {
var link:URLRequest = new URLRequest('www.youtube.com');
navigateToURL(link); }

Problem is that I cannot GET to that frame to even determine an error. The problem preventing me from getting to this point is a call function.

In the "HomePage" movieclip, when the button is pressed to go to the next scene, "Homepage" fades out and flys left then the next frame is 1 frame but activates the next movieclipe "HowWorksScene"...but without errors, it simply goes to frame 17 of "Homepage". I've tried doing
_root.gotoAndPlay(17);
but get an undefined error. So, I guess my question is:
What is the BEST way to direct from within a movieclip to a frame in the parent Scene? I've even tried using
gotoAndPlay(17, "Scene 1");
And that still did not work. Please let me know ASAP!

© Stack Overflow or respective owner

Related posts about flash-cs4

Related posts about actionscript-3