1337holiday
1337holiday

Reputation: 1954

Flash dynamic transitions

Just wanted to know what the best way of transitioning between pages in flash. Basically i have 5 pages, each of them have an intro animation (slide in, slide out). I know how to make them transition IN but say they click on some random page out of the 5 how do i transition out of the current page then somehow tell it to go to the one the user selected?

This is timeline based.

Any help appreciated, thank you.

Upvotes: 0

Views: 570

Answers (2)

PatrickS
PatrickS

Reputation: 9572

You will need to have a clickedPage variable which is set when the user clicks on a specific page.

Then you'll have a currentPage variable, if the clickedPage value is different from the currentPage go to the currentPage animation out frame.

At the end of the animation , update the currentPage value with the clickedPage value and start the animation in

Upvotes: 1

Aaron
Aaron

Reputation: 4614

When you're using the timeline, you can label specific keyframes on the timeline and jump to them using some straightforward ActionScript.

gotoAndPlay("LabelName");

In that way you can setup an area on the timeline for each page in three parts per page (intro, page loop/stopped page frame, exit). If you label each, you can jump to the intro of a given section and have it animate into the page loop/stopped page area. When you want to go elsewhere, you proceed to the animate out label and then to the animate in label for the selected section.

Upvotes: 1

Related Questions