# Help changing the hex colour number of a movieclip on a button press

**URL:** https://forum.kirupa.com/t/help-changing-the-hex-colour-number-of-a-movieclip-on-a-button-press/169787
**Category:** Uncategorized
**Created:** [November 19, 2005, 1:06pm UTC](https://forum.kirupa.com/t/help-changing-the-hex-colour-number-of-a-movieclip-on-a-button-press/169787 "2005-11-19T13:06:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![impsvi](https://avatars.discourse-cdn.com/v4/letter/i/b5a626/32.png) [@impsvi](https://forum.kirupa.com/u/impsvi)
#### Post date: [November 19, 2005, 1:06pm UTC](https://forum.kirupa.com/t/help-changing-the-hex-colour-number-of-a-movieclip-on-a-button-press/169787/1 "2005-11-19T13:06:58Z")

</div>

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
