Solved

Changing color of objects

Posted on 2002-05-01
1
184 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

724 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