FLASH 8 and CS3. Action Scripting 2.0 | Alejandra Jarabo |
Media Arts & Technologies division. Santa Barbara City College |
BUTTONS IN FLASH . ACTION SCRIPTING 2.0 |
ACTIONS ATTACHED TO A BUTTON 2 | |||||||||||
A Button is symbol that is specifically prepared to act as an EVENT HANDLER for an "action". An Action is a piece of programming (a script) that allows to create a response to a deliberate movement of the end user. I press a button: I go to a different frame and stop. |
|||||||||||
USING FRAMELABELS IN YOUR BUTTON-ACTIONS | |||||||||||
In the next animation you are going to see an example of working with Frame labels. You make a Frame label by "naming" a Keyframe on the Timeline. A Frame label looks like a little red flag followed by a name (looking at the Timeline Window). Navigating with Frame labels makes the Structure of your project Visually Clear, and allows you to do last minute timing arrangements (adding-subtracting frames, altering the order of events) without ruining all the previous Scripting. If you want to navigate to a frame number 5 and later on change the timing, you might end going to a wrong place in the Timeline. Frame labels should always be typed within quotes in the ActionScript window.
|
|||||||||||
In the future you are going to arrange your interactive projects so the Upper-most 2 layers are EXCLUSIVELY dedicated for Actions and for Labels. (if the project is a simple one, you can keep actions and frame-labels in the ACTIONS layer) This is a courtesy sign for other people reading your file, and it is a Standard work-procedure in the Commercial world. |
|||||||||||
How to make a Frame-label. How to attach an action to a button > go to a frame-label >gotoAndPlay |
|||||||||||
|
|||||||||||