troubleshooting Question

How do I use conditional statements to navigate from one frame to another via a motion tween?

Avatar of paulCardiff
paulCardiff asked on
Adobe Flash
2 Comments1 Solution368 ViewsLast Modified:
I have a Flash movie which uses conditional statements to navigate one frame at a time similar to a slide show, however I want to navigate with a motion tween between the frames. i.e.

when the user clicks i want the movie to go from frame 1 to frame 10. At the moment is goes frame1, click frame 2, click frame 3 etc. I have a motion tween between frame 1 and 10 and i want the movie to go frame 1, click .....tween.....frame 10.

I also want the option to go to previous frame in the same way.

Please help.


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);
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
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 2 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