Flash AS3 reverse play and check label exists
Hi all!
I've searched all over and I can't find what I need. if you can help me out I would very much appreciate it.
I have a movie clip named "ContentClip." Every 5 frames in this clip is a keyframe(classic tween) where an image or content moves from right to left (like as if you are swiping it).
Each key frame has a Stop(); on it so it can hold on that frame showing it's content.
I can play it forward no problem, but I am trying to reverse play back i.e replicate swiping right to go back 5 frames. Currently I have something similar to this -
e.target.parent.addEventListener(Event.ENTER_FRAME, playMe);
function playMe(e:Event):void
{
if(currentFrame == 1)
{
e.target.stop();
e.target.removeEventListener(Event.ENTER_FRAME, playMe);
}
else
{
e.target.prevFrame();
}
}
that is activated on one of the buttons. However, it doesn't stop when it reaches a frame with "stop();" which is an issue as I only want it to reverse for 5 frames.
How Can I -
Make it reverse only 5 frames?
Or make it reverse and stop to only when a frame has a 'label' (no specific label, just 'a' label)?
THank you!
