Search Tutorials
Lets start with the Flash file. Create a typical Flash moive, then use the Text tool to write the words "Status Bar" anywhere on the page you like. Now make this into a Button by selecting it and pressing "Convert to Symbol" from the Insert menu. On the resulting dialog box select "Button" and enter any name you like, I chose statusBtn. Now double click the button so you are editing that movie clip. There should be 4 frames defined. Add a layer and on this layer draw a box around the word shake. Drag this box to the "Hit" Frame and return to the main scene. That box will act as the area of the button, regardless of the text. Next select "Actions" from the "Window" menu. This should bring up the Actionscript window. Select your newly created button and return to the action script window. You should be in Normal mode, so from the tree on the right select "Actions - FScommand" and it should insert the following code:
on (release) {
fscommand ();
}
Next at the bottom, where it says "Command" type "status" without the quotes and next to "Arguments" type the text that you would like to see in the status bar. Finally, select the first line of action script which says "on( release )" and at the bottom uncheck release and check roll over. The complete Action script should look like:
on (rollOver) {
fscommand ("status", "Browser status set from within Flash!");
}
Now you are well on your way to executing a Javascript command from Flash!
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|