I'm new to flash - sort of. I started Flash a while ago but haven't touched it in two years. That said, I'm used to using AS2.0 and started making a game in 2.0. I'm trying to implement a screen in which the user can choose a characters skin and hair color from a typical color gradient. I have it set so that the skin color does in fact change colors based on what they click.
However, it doesn't remain this way. To get to this screen, there is a main menu with an instance of the character. Within the character each limb is separated into its own movieclip. And each limb is made up of some shading, an outline, and a movieclip of just the skin. On the color change screen, I have each limb separated out and given an instance name. Then, in each limb, I have given the skin portion an instance name. I then change the color of the skin, but upon returning to the main menu, the skin has reverted back to its original color. If I use the button to go back into the character appearance screen, the skin is back to its original color, and not the one the user selected. I guess how can I implement this so that the color choice sticks?
Here's my current code:
import flash.display.BitmapData;
function changeColor(clip, theColor) {
var myColor = new Color(clip);
myColor.setRGB(theColor);
}
mc_colorPicker._visible = true;
mc_colorPicker.colors.onPress = function() {
srcMC = mc_colorPicker.colors;
var colorBitmap:BitmapData = new BitmapData(srcMC._width, srcMC._height, true,
0x00000000);
colorBitmap.draw(srcMC);
colorValue = "0x"+colorBitmap.getPixel(srcMC._xmouse, srcMC._ymouse).toString(16);
changeColor(RULeg.skin, colorValue);
}
Thanks!