-
problems changing colour of a movieclip on a button press
hi, im coding a api drawing program in flash8 and im trying to create a colour preview box.
i was attempting to write code to change the hexidecimal colour value of a movieclip (which is a white square with the instance name of colour_mc) when a button is pressed.
The code for the buttons which when pressed will change the colour of the white square look like this:
//colour is a varible for hexidecimal colour of the linestyle command
//colour_mc is the white square which is ment to change colour.
a_btn.onRealease = function() {
colour = 0x000000;
colour_mc.transform.colorTransform = 0x000000;
};
I thought this code would work but it doesnt the movieclip doesnt change colour at all. Does anyone know were im going wrong? thanks
-
Try this:
a_btn.onRelease = function()
{
mycolour = new Color(mymc);
mycolour.setRGB (0x000000);
}
-
lovely stuff thank you!
i need to learn the commands keep using the wrong ones.
-
Flash Gordon
The letters on my F1 key have faded, because i can't remember all that stuff, seldomly used
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|