corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Flash/Action Script Help


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Flash/Action Script Help
Aaron
Member

Registered: 9th Aug 04
Location: Cottingham, East Riding
User status: Offline
12th Mar 09 at 17:13   View User's Profile U2U Member Reply With Quote

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
12th Mar 09 at 17:16   View User's Profile U2U Member Reply With Quote

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
12th Mar 09 at 17:21   View User's Profile U2U Member Reply With Quote

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
12th Mar 09 at 17:35   View User's Profile U2U Member Reply With Quote

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
13th Mar 09 at 19:23   View User's Profile U2U Member Reply With Quote

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!

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
xhtml validation help Houckham Geek Day 2 374
3rd Jun 06 at 18:37
by Houckham
 
Javascript function changing css? Rus Geek Day 1 655
22nd Jun 07 at 10:53
by Rus
 
website building help! antscorsa Geek Day 6 811
12th Jul 07 at 17:29
by loafofbrett
 
Form to send email flame1987 Geek Day 6 161
18th Feb 08 at 21:10
by flame1987
 
Uni Flash Project... Hoddo Geek Day 6 228
20th Feb 08 at 20:43
by Hoddo
 

Corsa Sport » Message Board » Off Day » Geek Day » Flash/Action Script Help 28 database queries in 0.0127230 seconds