View Full Version : how do you change rgb values hexadecimal RGB values?
rickyb62
April 29th, 2003, 12:01 PM
how do you change rgb values hexadecimal RGB values in action script?
lostinbeta
April 29th, 2003, 02:17 PM
Create a clip on the stage any color you want (besides red because we are going to change it to red in this example). Give it the instance name "block" (no quotes). Now.... add these actions to a frame on the timeline that you want the code to be activated in...
//create color object... block is the target
var myColor = new Color(block);
//create a variable to house the color to change to
//use setRGB to change the color of your clip
//0xFF0000 is the hex color for Red
myColor.setRGB(0xFF0000);
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.