so I am not new to flash but I have been trying to learn as3 and sometimes I feel
like Im getting somewhere with it, and other times, like I dont have a clue. So,
I have a banner with 4 frames each frame containing clips, and this script to push the frames around with event listeners. heres the problem. I cant get the timer to stop, and relooping to frame 3.
this is what ive tried.
I have put stopTimer(); on each frame at a time,
and it does not stop the timer from firing off.
so I know I need to remove the listener, which I
have put in the functions and on each frame, and
it does not remove it. im stuck! i was also thinking
an onEnterFrame event to remove the listener, is
that correct? I feel like I can learn individual pieces
but not how to structure in AS3,
import flash.utils.;
import caurina.transitions.;
stop();
var myTimer:Timer = new Timer(15000);
myTimer.addEventListener(“timer”, timedFunction);
myTimer.start();
function timedFunction(myTimer:TimerEvent):void
{
gotoAndStop(3);
trace(“Timer fired”);
this.stop();
}
function playVideo(over1:MouseEvent):void
{
gotoAndStop(2);
}
over1.addEventListener(MouseEvent.ROLL_OVER, playVideo);
function stopVideo(over1:MouseEvent):void
{
gotoAndStop(1);
}
over1.addEventListener(MouseEvent.ROLL_OUT, stopVideo);
//trace(myTimer);