can anyone tell me what’s wrong with my code? (i’m really new to flash and actionscript3).
forward_btn.addEventListener(MouseEvent.CLICK, forwardfunction);
function forwardfunction(event:MouseEvent):void
{
port_mc.play();
}
pause_btn.addEventListener(MouseEvent.CLICK, pausefunction);
function pausefunction(event:MouseEvent):void
{
port_mc.stop();
}
rewind_btn.addEventListener(MouseEvent.CLICK, myfunction);
function myfunction(event:MouseEvent):void
{
addEventListener(Event.ENTER_FRAME, rewindfunction);
function rewindfunction(event:Event):void
{
port_mc.prevFrame();
}
}
I have a strip of pictures that moves from left to right when user clicks “forward” button, pauses when the “pause” button is clicked and rewinds when “rewind” button is clicked.
My problem is that after rewind cycle is complete, none of the buttons work again. Also, while in rewind mode, pause button does not pause it.
I also had if and else statements for rewindfunction as
if (port_mc.currentFrame == 1)
{
port_mc.stop();
}
else
{
port_mc.prevFrame();
}
but it really seemed to have no difference on how it works.