setRGB in Action script 3 Flash Professional or Flex Builder

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

where setRGB_mc is the MovieClip name

setRGB method in action script 3 flash professional

Subscribe to get all tutorial updates, promotional offers and download links for all tutorials via E-Mail

Enter your email address:



Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">