FLASH CS4 | Alejandra Jarabo |
Media Arts & Technologies division. Santa Barbara City College |
INTERACTIVE MAP USING DOT SYNTAX |
DOT SYNTAX STRUCTURE | |||||||||||
Dot Syntax is a formatting convention to create quick and efficient phrases that refer to buttons, movie clips and other objects. The “dot” • is used to indicate the properties or methods related to an object (there is no space in between the elements and the dot) |
|||||||||||
DOT SYNTAX STRUCTURE APPLIED TO A MOVIECLIP | |||||||||||
Once we had named our movieclip on Stage "ball_mc", we could create an action attached to a frame (in the ACTIONS layer) asking this movieclip to Stop. It will be written like this:
you have been using dot syntax in AS 3 since module 8
|
|||||||||||
BUILDING AN INTERACTIVE MAP | |||||||||||
To Build our Interactive map, we will have to create a basic interface, with all buttons ready to be pressed. The interface will be generally built on frame 1, or wherever you want to place the Stop action that allows the user to choose. CREATING TRANSPARENT BUTTONS If the artwork for the map cannot be separated (you are working with a bitmap graphic containing the map artwork) you might want to create "transparent buttons", BUTTONS WITH REMOTE ROLLOVERS A remote rollover is an html concept, applied to a situation where the artwork for the rollover is not placed on the same location than the artwork for the hot-spot over the page. It is very easy to create something of this type in a Flash-button, all you have to do is place the artwork for the rollover Stage in a different area than the artwork for the up stage of the button. Notice that placing content on rollover is an opportunity to give some information, not just a fancy-looking feature. CONTENT LAYER In a good interactive map the main interface never disappears, so your options for clicking and coming back to another section remain always open. For this reason, the content that appears when you click the button, should be placed only on a certain part of the Stage. |
|||||||||||
THE SCRIPT: CALLING A BUTTON FROM A FRAME_ACTION | |||||||||||
Since we are going to write the Action Script for your buttons, inside a frame-action, all the scripting for the buttons will be placed in one location. Classical programmers love this way of structuring the file; this way they don't need to find the buttons and select them one by one to find the code. We will use Frame-labels instead of frame numbers in the code: Remember that the frame-label needs to spelled exactly the same in the label (through the Properties panel) than in the code. |
|||||||||||
Example of Dot syntax in the Actions Panel. Notice the selected Keyframe in the 'ACTIONS' layer. |
|||||||||||
|
|||||||||||
|
|||||||||||