First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Sportzguy933

Example 2

Let's say I wanted the user to be able to set the alpha of my background. Create a new Flash document, and make a red box that covers your entire stage (550 x 400 by default). Convert it to a movie clip, and make the instance name “Background”, and make sure it’s coordinates are X=0. Then make a new layer. Make a static text box that says "Enter Alpha Here:" and then an input text box. (Be sure that the text box background property is enabled so that you can see it). Lastly make a rectangular button under that input text box. Make the variable name of that input text box “newAlpha”. Now click the button and press F9 to open the actionscript panel, and place this script: on (release) { if (newAlpha != “”) { Background._alpha = newAlpha; } } Basically, we are telling Flash then when the user clicks that button, check to see if the user inputted a value. If they did, then set the background’s alpha to that value. (If you don’t know how to use variables or dynamic/input text boxes, please read a tutorial on it, as it will serve you VERY well ;-). Alright, so now you should have a small app that lets the user change the transparency (alpha) of the background when they click the button. If you play around with this for a bit, you’ll notice that 100 alpha is solid, and 0 is completely transparent (not visible). On the next page, we’ll take a look at another method of controlling Alpha.
» Level Basic

Added: 2007-03-29
Rating: 6.73 Votes: 11
(10 being the highest)
» Author
If you need any help, please feel free to email me:
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.