troubleshooting Question

How do I use conditional statements to play motion tween?

Avatar of paulCardiff
paulCardiff asked on
Adobe Flash
3 Comments1 Solution501 ViewsLast Modified:
I have made a flash movie and want the script to navigate one frame at a time but instead of going to nextFrame(); I want it to play the next frame which is a motion tween, and have the ability to go back and forth just like a static slide show

The code I have so far is below:
I think I need to replace prevFrame(); and nextFrame(); with different script
stop();
function goBack(event:MouseEvent):void
{
	if(currentFrame == 1)
	{
		gotoAndStop(totalFrames);
	}
	else
	{
		prevFrame();
	}
}
function goForward(event:MouseEvent):void
{
	if(currentFrame == totalFrames)
	{
		gotoAndStop(1);
	}
	else
	{
		nextFrame();
	}
}
 
back_btn.addEventListener(MouseEvent.CLICK, goBack);
next_btn.addEventListener(MouseEvent.CLICK, goForward);
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros