Produces a number that is the effective result of inserting the hex value AA into an existing color value : Color « Graphics « Flash / Flex / ActionScript






Produces a number that is the effective result of inserting the hex value AA into an existing color value

 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

        var colorValue:uint   = 0xFFFFCC99;  // A sample color
        colorValue &= 0xFF00FFFF;
        colorValue |= (0xAA<<16);
        trace(colorValue.toString(16));  // Displays: ffaacc99

    }
  }
}

        








Related examples in the same category

1.To retrieve the value of a single channel from a 32-bit color value, we can use the right shift and bitwise AND operators together