Developing Webs logo
Google
Web DW-Main DW-Photoshop
Visit the message board for solutions or post a question Check out the Classes offered for free at Developing Webs Voice Chat submit a tutorial, resources, article, font for publication consideration and earn a one way link back to your site Get more specifics about the Developing Webs Voice chat room and its room members View the current news at Developing Webs alternative sites which are resources for your d3evelopment needs Join Developing Webs Chat Link to us on your web page to help support this resource! Check out Developing Webs At yahoo groups! Developing Webs Home Adobe Photoshop Tutorials Macromedia Flash Tutorials Jasc Paint Shop Pro Tutorials Adobe Illustrator Animation basics Some Basic PHP tutorials Perl Tutorials HTML Tutorials Cascading Style Sheets javascript Front Page Tutorials Macromedia Dream Weaver Tutorials dreamweaver Publishing your site, FTP, ChMod, Promotions
RSS Newsfeed
for your site
DW News
Calendar
DW Forum
Right click on button and copy shortcut

Add to My Yahoo!

Reminder
Remember to book mark this site!



Request a Tutorial

Changing the color of a movie clip

This tutorial takes you step by step in creating a setcolor actionscript.



1. Open a new flash file.

2. Create a black ball with no outside stroke.

3. Use your arrow tool to click on the fill. Select Insert > Convert to symbol. Name it ball and set at movie clip.


4. Open the Instance Panel and name this instance of your ball, "myball".

5. Make an oval with black outline. Double click the oval to select it. Then hold hold alt key and drag an new copy and place below the first oval. While the second copy is still highlighted, holdy our alt key and drag a new copy to just below the second so that there are three ovals.

6. Fill each oval with green, blue, and red respectively making note of
the hex code used for each one.

7. With the black arrow tool, highlight the green oval by double clicking. Click Insert > Convert to
Symbol. Name it greenbutton and set at "button".

8. Highlight the blue oval and convert to a button and name it bluebutton.

9. Highlight the red oval and convert to a button and name it redbutton.

10. Click on the green button.
 

11. Open your actions panel. Click Actions =>Variable => Set variable

12. In the "variable" text box, type in "colorball".

13. Click in the "value" text box, then click the  objects =>movie =>color =>new Color.

14. Click inside the brackets for New Color() to set your curser location. When your cursor is positioned, Click the Insert Target Path (crosshairs) at the bottom of the actions panel then on myball.

 

15. Then check the Expression box on the right


16. Make sure that second line of script that we just edited is still highlighted. Then click  object=> movie=> color=> methods=> set RGB. Click in the object box in the parameters and  type colorball. In the parentheses you will see 0xRRGGBB.
Highlight the RRGGBB part of this and insert the hex code for your green
color that you made note of before. On mine, I used 00FF00.

 

17. Click on the blue button and follow steps 12 thru 16, setting the hex code
to the blue code that you used for the button. I used 0066FF.

18. Click on the red button and follow steps 12 thru 16, setting the hex code
to the red code that you used for the button. I used FF0000.

19. Save your movie and test it to make sure it works.
 



"Building The Web Into a Nicer Place -- One Site At A Time"
Developing Webs Group Copyright © 2001-2025 All Rights Reserved
Privacy and Legal