setRGB in Action script 3 Flash Professional or Flex Builder

Posted by & filed under Action Script 3, ADOBE FLEX, Flash.

The setRGB() method is used in action script 2 to set color properties to movie clips, but that method is no longer present action script 3. setRGB() functionality achieved in action script 3 using colorTransform class

import flash.geom.ColorTransform

Here is the sample code, how to set color properties to movie-clip using setRGB() in action script 2

var set_color:Color = new Color(setRGB_mc);
set_color.setRGB(0x00FF00);

where setRGB_mc  – MovieClip name

setRGB method in action script 2 flash professional

Here is the sample code, how to set color properties to movie-clip in action script 3

import flash.geom.ColorTransform;

var set_color:ColorTransform = new ColorTransform();
set_color.color = 0xFF0000;
var tr:Transform = new Transform(setRGB_mc);
tr.colorTransform = set_color;

where setRGB_mc is the MovieClip name

setRGB method in action script 3 flash professional.

Download Premium Only Scripts & 80+ Demo scripts Instantly at just 1.95 USD per month + 10% discount to all Exclusive Scripts

If you want any of my script need to be customized according to your business requirement,

Please feel free to contact me [at] muni2explore[at]gmail.com

Note: But it will be charged based on your customization requirement

Get Updates, Scripts & Other Useful Resources to your Email

Join 10,000+ Happy Subscribers on feedburner. Click to Subscribe (We don't send spam)
Every Email Subsciber could have access to download 100+ demo scripts & all future scripts.

%d bloggers like this:

Get Instant Script Download Access!