How to Make a Flash Movie Invisible With Action Script
When creating a Flash project, you can use the ActionScript programming language to alter the way objects react in the scene. MovieClips can be any object that has a timeline, including a character walk cycle or a spaceship moving across the screen. Using ActionScript will help you turn a MovieClip object invisible. This is beneficial if you want the user to turn the movie on and off with the click of a button or any other available action.
Instructions
-
-
1
Start your Adobe Flash creation software from the Start menu. Open the project you want to alter by choosing "Open File" from the File menu at the top of the screen.
-
2
Open the Actions Panel by choosing "Actions" from the Window menu at the top of the screen or by pressing the "F9" button on your keyboard. The Actions Panel is used to add ActionScript code to your Flash project.
-
-
3
Click on the Script pane on the right-hand side of the screen. Place your cursor where you want to add your ActionScript code.
-
4
Type "MovieClipName.visible = false;" on a new line in your code where "MovieClipName" is the name of the MovieClip you want to turn invisible.
-
5
Surround your code with events or modifiers if you want to turn the MovieClip invisible only with certain actions. For instance, if you want to make the MovieClip invisible when the mouse moves to the left, change the code to "function onMoveLeft(evt:MouseEvent):void { MovieClipName.visible = false; }".
-
6
Save your Flash project in order to keep the ActionScript in your file when you close the program.
-
1
Tips & Warnings
Change the "visible" option to "true" if you want the MovieClip to reappear.
References
Resources
- Photo Credit computer image by Orlando Florin Rosu from Fotolia.com