Download presentation
Presentation is loading. Please wait.
Published byMagdalen McCormick Modified over 9 years ago
1
Introduction to Flash MX 2004: Action Scripting Lloyd Rieber
2
Workshop Objectives By the end of the workshop, you should be able to: Add simple scripts in to frames and buttons Add labels to particular frames and use scripts to link to these frame labels Add simple scripts to buttons to give the user control over the actions in a movie Use Flash as a hypermedia authoring tool Get and use the user’s name in a project.
3
Using Scripts in an object-oriented environment like Flash Scripts can be attached to almost any object: –Frames, graphics, buttons Scripts are activated when an “event” occurs –A frame is played –A button is pressed –A movie clip starts to run There is no one BIG controlling program, such as in Authorware. Instead, the various objects, and their scripts, interact with one another
4
Our first script: Giving the user control over a screen animation Quick review of animating (via a motion tween) and rotating a simple object Developing good habits –Adding separate layers for labels and scripts Creating a frame label and adding a script to loop to that label
5
Enhancing the movie to give the user control over it Creating a button Changing the tint of 2 instances of the button Adding scripts to let the user stop and start the animation
6
Creating Buttons Any object can be a button Create object, make it a symbol (F8), and choose “button” behavior Drag instances of the button from the library to the stage Add separate text to the button Don’t be shy in using the buttons in Flash’s “common library.”
7
Using Buttons Understanding the syntax of “Event Handlers” on (release) { gotoAndPlay(1); } In English… –On the event of “release of the mouse button”, do whatever is between the {}, in this case, go to frame 1 and begin playing. Other button events –Press, roll-over, drag-over, etc. Hint: Learn about action scripting syntax from studying scripts created by behaviors.
8
Creating Hypermedia with Flash Using buttons and simple scripts to give the user control over the entire movie Example: Civil War Kiosk –Main Menu, with links to… Battle of Gettysburg page Battle of Antietam page Battle of Cold Harbor page –Each battle page has “main menu” button –Making separate movie clips containing “mini-kiosks” for each battle.
9
Time for Questions
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.