The alpha value of pixels can be set in transparent bitmaps only (i.e., bitmaps created with the value true passed to the transparent parameter of the BitmapData constructor) : BitmapData : Graphics Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Graphics » BitmapData »

 

The alpha value of pixels can be set in transparent bitmaps only (i.e., bitmaps created with the value true passed to the transparent parameter of the BitmapData constructor)


 

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

        var imgData:BitmapData = new BitmapData(2020, true, 0x330000FF);
        trace(imgData.getPixel32(00));  // Displays: 855638271
                                  // (Alpha is 0x33)

    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Graphics
» BitmapData