How to Make a Flash Movie Invisible With Action Script

How to Make a Flash Movie Invisible With Action Script thumbnail
Turn MovieClips visible and invisible from your computer with ActionScript.

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.

Things You'll Need

  • Adobe Flash creation software
Show More

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.

Tips & Warnings

  • Change the "visible" option to "true" if you want the MovieClip to reappear.

Related Searches:

References

Resources

  • Photo Credit computer image by Orlando Florin Rosu from Fotolia.com

Comments

You May Also Like

Related Ads

Featured