Changing color of movie clip in AS3

I'm not a complete newbie, but my AS knowledge is very rudimentary.  I am trying to create code that would change the color of a movie clip.  I have the code pasted below.

Ultimately, I am creating a sort of paintbrush game.  The user clicks on a color palette (named amalgam_mc, crown_mc), which stores the associated color.  Each object that is clicked takes on that color (such as tooth01_mesial_mc, tooth02_mesial_mc, etc.).  

Unfortunately, I'm stuck at the beginning with changing the color of a movie clip.  I ask for a push in the right direction.  
import flash.geom.ColorTransform;
 
amalgam_mc.addEventListener(MouseEvent.CLICK, colorClick);
crown_mc.addEventListener(MouseEvent.CLICK, colorClick);
complete_denture_mc.addEventListener(MouseEvent.CLICK, colorClick);
 
tooth01_mesial_mc.addEventListener(MouseEvent.CLICK, toothClick);
 
var activeColor:ColorTransform  = new ColorTransform;
 
 
function colorClick(event:MouseEvent):void
{
	trace("Click is fired");
	if (event.target.name = "amalgam_mc")
	{
		trace("Target recogized as amalgam_mc");
		activeColor.color  = 0x0000FE;
	}
}
 
function toothClick(event:MouseEvent):void
{
	trace("Click is fired");
	if (event.target.name = "tooth01_mesial_mc")
	{
		trace("Target recognized as tooth01_mesial_mc");
		tooth01_mesial_mc.transform.colorTransform = activeColor;
	}
}

Open in new window

LVL 9
jkunreinAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkunreinAuthor Commented:
Adding more zones and points to the question.
0
blue-genieCommented:
your code will work you just have a basic syntax error
when you assign a value to something

thisvalue = thisValue;
if you want to check if 2 values are the same

if (thisvalue == thisValue) { ...

so your code

if (event.target.name = "amalgam_mc")//2 instances
need to be ==

blu

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jkunreinAuthor Commented:
Oh, of course!  I keep forgetting that.  Well, another dozen mistakes like this, and I should have this down perfect.  Thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.