I’m very new to Flash and AS3, but I’m getting by after completing Todd Perkins’ training book.
I’ve come across my first obstacle that I’m not able to solve.
I’ve created a simple animation.
Here is the basic skeleton:
Main Timeline:nested movieclip:multiple nested movieclips.
I have a button on the main timeline to control one of the movieclips in the ‘multiple nested movieclips’ branch. The code I have in place is :
stop();
function stopbiomovie(event:MouseEvent):void
{
bio_mov.gotoAndStop(1);
}
function playbiomovie(event:MouseEvent):void
{
bio_mov.gotoAndPlay(1);
}
bio_but.addEventListener(MouseEvent.MOUSE_OVER, stopbiomovie);
bio_but.addEventListener(MouseEvent.MOUSE_OUT, playbiomovie);
where bio_mov is the movieclip I want to control. The first nested movieclip is in a keyframe on frame 1 with just a stop(); code in frame 1. When the movieclip finishes, I have code in place to advance the maintimeline to frame 2 and the movieclip remains, looping on its final frame. Everything runs smoothly … until I add the above code in frame 2. When I add this code and attempt to play the project, the first nested movieclip just skips through, and keeps doing so. No button control. I get the following error messages:
1120: Access of undefined property bio_mov.
1120: Access of undefined property bio_mov.
1120: Access of undefined property bio_but.
1120: Access of undefined property bio_but.
with the following sources respective:
bio_mov.gotoAndStop(1);
bio_mov.gotoAndPlay(1)
bio_but.addEventListener(MouseEvent.MOUSE_OVER, stopbiomovie);
bio_but.addEventListener(MouseEvent.MOUSE_OUT, playbiomovie);
Okay, I hope this is a thorough enough description of the problem and what I’m trying to accomplish. Any help would be great. Thanks.