Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing RGB colors

Status
Not open for further replies.

rds747

Technical User
Mar 8, 2005
180
US
Hi,

I use the Color class and its RGB property to change the color of an image to red. However, after changing the color to red (0xFF0000), I would like to change the color back to the image's original color.

I thought I did that by changing the color back to black, but the spaces between the images get colored in as well.

To illustrate my problem I've included a hyperlink that has the swf file, which has a button to the left that changes the image to red and a button to the right that changes the image to black. Notice how the spaces in the image get filled in black.

How would I prevent this from happening?

Here is the hyperlink:
Here is the code I've used:
Code:
FurnaceColor = new Color(Furnace_mc);

FurnaceRed_btn.onRelease = function()
{
	FurnaceColor.setRGB(0xFF0000);
}

FurnaceBlack_btn.onRelease = function ()
{
		FurnaceColor.setRGB(0x000000);
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top