I’m creating a website in flash and I’m having trouble finding what code to use for timeline and movieclip navigation. Right now I have my main navigation buttons on the main timeline, and a separate animation that serves as my content container on a movieclip within the main timeline. I don’t know how to make it so that when I click a button on the main timeline to have it navigate to a frame within the content movieclip. I’ve found many troubleshooters regarding how to control the main timeline from within a movieclip, which is the opposite of what I’m trying to do.
I also have MouseOut handlers on the buttons which direct to mouse out animations on the main timeline.
HomeBtn1.addEventListener(MouseEvent.MOUSE_OUT, fl_MouseOutHandler_1);
Num2Btn.addEventListener(MouseEvent.MOUSE_OUT, fl_MouseOutHandler_2);
ThrdBtn1.addEventListener(MouseEvent.MOUSE_OUT, fl_MouseOutHandler_3);
function fl_MouseOutHandler_1(event:MouseEvent):void
{
gotoAndPlay(2);
trace("Moused out");
}
function fl_MouseOutHandler_2(event:MouseEvent):void
{
gotoAndPlay(30);
trace("Moused out");
}
function fl_MouseOutHandler_3(event:MouseEvent):void
{
gotoAndPlay(56);
trace("Moused out");
}
I would like it if I could add a function like this:
function fl_ClickToGoToAndStopAtFrame(event:MouseEvent):void
{
gotoAndStop(x);
}
But with a path targeted within the movieclip, I know it may sound like a simple question but I’m relatively new to flash.
To target the content movieclip:
1. Give it an instance name.
Select it on the stage and enter a name in the textfield on the Properties panel. Call it something like ‘contentClip’.
2. Access it in your code using the instance name.
Will make the content clip go to frame 30.