\"Frame Delay\").
3. Size the frame at about 300x300 (\"Frame\" > \"Frame Size\").
4. Draw 2 circles with the \"Ellipse Tool\"."/>
Our Flash tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website.  Home Flash & Swish Flash Tutorials Modify Shape Color with ActionScript
Your Ad Here

Modify Shape Color with ActionScript


This tutorial was written for the Flash Designer software, which allows you to create flash animations in a much easier way than by using Macromedia Flash. You may get Flash Designer here.

Follow the steps below:

1. Launch Flash Designer and create a blank document.
2. Set the frame delay to "Stop" ("Frame" > "Frame Delay").
3. Size the frame at about 300x300 ("Frame" > "Frame Size").
4. Draw 2 circles with the "Ellipse Tool".
5. Select both shapes (Ctrl+A). Choose "Item" > "Line and Fill" > "Line Width" > "None".
6. Choose "Edit" > "Convert to Sprite". The object should appear as "Sprite3"
7. Right-click it and click "Placement Properties".
8. Check the "Action-Script Target" checkbox and click OK.

Next, create 2 color buttons below "Sprite3":

1. Choose "Rectangle" tool and draw a small rectangle (about 18 x 18 pixels, hold CTRL to draw both edges equal)
2. Change fill color to purple
3. Choose "Item" > "Actions" > "OnClick" and enter the following ActionScript code:

myColor = new Color(Sprite3);
myColor.setRGB(0xff00ff);

4. Duplicate the rectangle with "Edit" > "Duplicate"

5. Change fill color to green

6. Choose "Item" > "Actions" > "OnClick" and modify the following ActionScript code:

myColor = new Color(Sprite3);
myColor.setRGB(0x00ff00);

7. Hit F9 to play the file.

Download source project t1036.zip



Author's URL: Selteco.com
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

Internet & computing Flash is a vector-based moving graphics format created by Macromedia for the publication of animations on the World Wide Web. More Flash & Swish: Most Popular Materials | Fresh Materials | More Flash Tutorials at FlashPerfection.com

Add comments to "Modify Shape Color with ActionScript"

Only registered users can write comment

No comments yet...