Link to home
Start Free TrialLog in
Avatar of DallySP
DallySP

asked on

Using a button to play an animation then jump to another frame

I'm designing a navigation sytem in flash. On clicking a button on the timeline I want to play a short animation, then go to the relevant frame where I will load in the content. If the animation starts on frame 2 and ends on frame 10 with a stop action, what actionscript should I put on the button for say the contact page in order for it to gotoAndPlay (2) then gotoAndStop("contact"),
Avatar of ieciep
ieciep

button action:
----------------
on(release)
{
gotoAndPlay (2);
}

Frame 10 action:
-------------------
on keyframe number 10 write this action:

gotoAndStop("contact");

when your animation is ended on frame 10, you are moved to your desired frame i.e. with contact label.
Avatar of DallySP

ASKER

The problem is I have more than one page. I have a page for contact, a page for about us etc. When each one's button is pressed I need the timeline to play the animation between 2 and 10, THEN go to "contact" which is on frame 30, or "about us" which is frame 40 etc. I wondered if there was an actionscript instruction that allowed you to do one action and on completion do another all on button - does that make sense?
ASKER CERTIFIED SOLUTION
Avatar of Tom Ray
Tom Ray
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can omit the lines that begin with "trace"

i just used that to test and verify.
Avatar of DallySP

ASKER

That brilliant - thanks very much.
glad i could help.