type = 'application/x-shockwave-flash'
data = 'http://sitepointstatic.com/flash/color.swf'
width = '400'
height = '400'
bgcolor = 'black'
Download the sample files here.
1. Create a large rectangle.
2. Convert the rectange to a movie clip, and give it an instance name of "rectangle".
3. Create a small square button.
4. Create a small text field, and give it a variable name "hexcode".
5. Assign the button the folliowing action:
colorchange = new Color("/rectangle");
hexcode = (colorchange.getRGB()).toString(16);
6. You’re done! Press ctrl+enter to check the movie.
Georgina has more than fifteen years' experience writing and editing for web, print and voice. With a background in marketing and a passion for words, the time Georgina spent with companies like Sausage Software and sitepoint.com cemented her lasting interest in the media, persuasion, and communications culture.