Wednesday 3 October 2012

Week 3: action scripting in flash

Now i am going to actionscript the flash document to make the animation transfer from one scene to another. To do this i have to create another scene from my first one in flash. To do thatyou have to go to Insert > Scene in the toolbar at the top of the application, then you have your new scene.

i then put action script on the button. To do this i selected the button and right-clicked on it and selected it to open the actions window at the bottom of the menu. The actions window will pop up then i start action scripting.

The action script i put in for it to go to the next scene is
on (release) {
gotoAndPlay("Scene 2",1);
}
However to make sure the button is used properly you have to put a stop action on the scene where the button. To do this you have to right click on the frame where the button is in a new layer and put the stop action from the action script menu in the actionscript.

The button is now action scripted
 
Now i to added sound to my button to put some sound in the animation. to do this i im going to shorten a sound to under a second to make it suitable for the buttons properties. First i got a sound effect to fit with the button. i impotred the sound i wanted into audacity and selected the ammount of sound that i wanted ton have imported into flash. so i selected it and went to File > Export selection.
 
I then imported the sound into flash's librairy and double clicked my button and i added the sound effect to the buttons over frame on a new layer


No comments:

Post a Comment