Aaron
Member
Registered: 9th Aug 04
Location: Cottingham, East Riding
User status: Offline
|
I'm making a small and simple animation for my degree. To cut a long story short...on frame 1 of my animation/movie (whatever) there are 4 buttons for the viewer to press...each going to a different section of the animation.
I quite simply need the action script code to link each of the buttons to their relevant frames (2, 3, 4 and 5) on an individual basis....just like a simply hyperlink in a powerpoint presentation which will take it to a different slide.
So far, I’ve just got the stop command on frame 1....so that the movie stop and the user can choose which section they then want to look at (out of 4 of course)
Oh, and yes i'm looking into trying to figure it out myself but getting no where....i'm a total n00b at anything like this
[Edited on 12-03-2009 by Aaron]
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
look for the gotoandplay command on google, it's something like fs.GoToAndPlay(x) - where x is the frame number.
|
Aaron
Member
Registered: 9th Aug 04
Location: Cottingham, East Riding
User status: Offline
|
Yeah just noticed that bit...and got it to go to the slide.
The only thing is...it does it on its own as soon as i run the movie, and i want it to do it on a mouse click of that particular button.
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
in which case you'd need to setup functions for each button and put the gotoplay in these functions.
I'm a little rusty on A.S to be honest, but you should be able to add action script to a button (perhaps right click on it). Although the latest versions are a complete ballache.
|
JamesMG
Member
Registered: 14th Nov 06
Location: Newcastle-under-Lyme, Staffordshire
User status: Offline
|
If it runs straight away, you need to add a stop command 'stop();' at the frame witch releates to the menu screen..
It maybe worthwhile setting the animations up within a movie so that you can keep just one frame on the scene and control the movies relatively with the buttons. Otherwise you may find that when your on a different keyframe the same button doesnt work / does something else!
|