Posted 15 years ago
·
Author
Warning: the way to add code to buttons has changed since these videos were made
How do add actionscript to a button:
1) click on your button, and name your button in the properties tab
2) add a new layer
3) right click the stage in the new layer and click actions to open the actionscript window
4) add the following code
Watch the following videos in order:
1) http://www.youtube.com/watch?v=U49_tSB_HrE
2) http://www.youtube.com/watch?v=nYkIMVO5 ... 1B&index=7
3) http://www.youtube.com/watch?v=rmhc8Dsy ... 1B&index=9
Assignment:
For this assignment we will be creating a music video. Your flash assignment should include your favorite song, some animations, custom buttons, and a link to the band's website.
01) Draw your own play, stop, pause, skip, back, and jump button onto the stage, do not use buttons that are already in the library
02) Convert each button you drew into button symbols, re-watch video 3 if you do not remember how to create custom buttons
03) Import your favorite song into the project
04) Drag the song onto the stage, see assignment 1 instructions if you do not remember how to add sound
05) Name your first layer "GUI", and stretch it to the length time line to the length of the song
06) add an action to the play button, and code the movie to play when the button is clicked
07) add an action to the stop button, and code the movie to stop when the button is clicked
08) add an action to the pause button, and code the movie to pause when the button is clicked
09) add an action to the jump button, and code the movie to jump when the button is clicked, place the frame number of the frame containing your favorite part of the song into the "gotoAndPlay" method
10) coming soon
How do add actionscript to a button:
1) click on your button, and name your button in the properties tab
2) add a new layer
3) right click the stage in the new layer and click actions to open the actionscript window
4) add the following code
yourButtonNameHere.addEventListener(MouseEvent.CLICK, myButtonNameHereFunction);
function myButtonNameHereFunction(event: MouseEvent)
{
WRITE CODE FOR THIS BUTTON HERE
}
Watch the following videos in order:
1) http://www.youtube.com/watch?v=U49_tSB_HrE
2) http://www.youtube.com/watch?v=nYkIMVO5 ... 1B&index=7
3) http://www.youtube.com/watch?v=rmhc8Dsy ... 1B&index=9
Assignment:
For this assignment we will be creating a music video. Your flash assignment should include your favorite song, some animations, custom buttons, and a link to the band's website.
01) Draw your own play, stop, pause, skip, back, and jump button onto the stage, do not use buttons that are already in the library
02) Convert each button you drew into button symbols, re-watch video 3 if you do not remember how to create custom buttons
03) Import your favorite song into the project
04) Drag the song onto the stage, see assignment 1 instructions if you do not remember how to add sound
05) Name your first layer "GUI", and stretch it to the length time line to the length of the song
06) add an action to the play button, and code the movie to play when the button is clicked
07) add an action to the stop button, and code the movie to stop when the button is clicked
08) add an action to the pause button, and code the movie to pause when the button is clicked
09) add an action to the jump button, and code the movie to jump when the button is clicked, place the frame number of the frame containing your favorite part of the song into the "gotoAndPlay" method
10) coming soon
Last edited by Don Von Alpha Dom on Mon Nov 30, 2009 2:32 pm, edited 1 time in total.