Movie Clip Properties with AS 3.0 - 2
When coding in ActionScript, we will usually want to add our code to Frame 1 on a new actions layer in the Timeline. So, let's add a new layer to the Timeline.
7. Click on the Insert Layer button in the Timeline and rename our new layer "actions". The new actions layer will automatically be the top layer in the Timeline and we should be on Frame 1.
Now click Window, Actions to open the Actions panel. Because we are working on Frame 1 in the actions layer, the tab at the bottom of the panel should say actions:1. Click within the Script pane to begin the first line of code.
8. We need to tell Flash what instance of the snowflake we want to control with the code. Type "snowflake1_mc" on the first line. Next, add a period after the instance name to tell Flash that something more will follow.
9. We will tell Flash that we want to set a value for the Alpha property. Add "alpha" after the period.
10. Finally, we will set the Alpha value. Add a space after "alpha" and type "= .2;" to finish the code. This will set the Alpha to 20%.
snowflake1_mc.alpha = .2;
11. When we test our movie again, we should see a nice light gray snowflake.
Copyright 2018 Adobe Systems Incorporated. All rights reserved. Adobe product screen shot(s) reprinted with permission from Adobe Systems Incorporated. Adobe, Photoshop, Photoshop Album, Photoshop Elements, Illustrator, InDesign, GoLive, Acrobat, Cue, Premiere Pro, Premiere Elements, Bridge, After Effects, InCopy, Dreamweaver, Flash, ActionScript, Fireworks, Contribute, Captivate, Flash Catalyst and Flash Paper is/are either [a] registered trademark[s] or a trademark[s] of Adobe Systems Incorporated in the United States and/or other countries.
Editor's Picks Articles
Top Ten Articles
Content copyright © 2019 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.