Ok, so maybe I’m fobbing you off with some old tutorials whilst I’m doing my exams, but hey, it’s content isn’t it? Here’s another old tutorial following on from the last one showing you how to add some simple actionscript to your buttons to perform the most called for commands.
FrozenHaddock Tutorials: Buttons 2
In this tutorial, I’m going to cover differant pieces of Actionscript you can put on
buttons. Things such as differant frames, and hyperlinks.
Code 1- Moving to a differant frame
If you put the following code into the actions panel on your button, if will take
you to a differant frame in your movie.
- on(release){
- gotoAndStop(2);
- }
This piece of code will send you to frame 2, you can change the bolded script
and it will take you to that frame number instead.
- on(release){
- gotoAndStop("frame");
- }
This code will take you to the frame labelled ‘frame’, you can change the bolded
script to change which frame you are going to.
Code 2- Hyperlinks
If you put the following code into the actions panel on your button, it will take
you to an internet page or a local file.
- on(release){
- getURL("http://www.frozenhaddock.co.uk");
- }
This code will take you to frozenhaddock.co.uk, you can change the bolded
script to change where the hyperlink sends you.
discuss this topic to forum
