Friday, March 09, 2007

Changing movie clip colors

I'm trying to isolate the method to change the color of a movie clip. So far, no dice. I've been able to change a movie clip to black, but can't get any variation on the tone! Here's the swf: dynamicColorSwitch. Click on the purple block to turn the house (sigh) to black.

Oh yea, I'm reusing some of my old graphics for testing. It's easier to just recycle, and much prettier to look at than plain squares. Plus GA has too many counties to get THAT involved for testing.

I've gotten it to work! See dynamicColorSwitch2

Here's the code on the purple button:
on(press) {
house_color=0x7a287a; // assigns color for variable house_color
set_house_color = new Color("/house"); // prepares variable set_house_color to affect MC "/house"
set_house_color.setRGB(house_color); // assigns house_color to set_house_color
}

 

0 comments: