Solved

Changing color of objects

Posted on 2002-05-01
1
142 Views
Last Modified: 2010-04-03
I have tried to figure out a couple of different examples that I have found on flashkit.com about changing colors of objects but can't seem to figure out what I'm doing wrong.  If you download the following fla

http://www.flashkit.com/movies/Utilities/Other/Color_Pi-Kumar_K-5422/index.shtml

as an example and when you take the "box" movie out of the scene and then place it back into the scene again from the library it looses its functionality.  If I could figure out why this is happening I could probably figure out how to make it change colors.  If you create an object and make it a particular color, will you be able to change it in actionscript or do you need to tell the objects color in actionscript from the beginning?  I hope I have made this understandable.  I have even checked the actions of the box movie before deleting it from the scene to test it and there are no actions.  Am I not looking in the right place?

0
Comment
Question by:Zantis
1 Comment
 
LVL 6

Accepted Solution

by:
rootdir earned 100 total points
ID: 6984353
Simple when you are taking the "box" movie out of the scene and then place it back into the scene. You are not giving "Mc" instance name to placed back "box" movie. If you give that, you can see it will change color again.

No you donot need to tell perticular color from bigning. You can assign color to movie at runtime like this

    MCColor = new Color("Mc");

this line creates new color for moive "box" having instace name "Mc".

    MCColor.setRGB(0xFFFFCC);

Here you can assign color by setRGB function.

I think this will help you out

Cheers
RootDir
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now