Mega Code Archive

 
Categories / Flash ActionScript / Graphics
 

The alpha value of pixels can be set in transparent bitmaps only (i e , bitmaps created with the value true passed to the transpa

package{   import flash.display.*;      public class Main extends Sprite{     public function Main(){         var imgData:BitmapData = new BitmapData(20, 20, true, 0x330000FF);         trace(imgData.getPixel32(0, 0));  // Displays: 855638271                                   // (Alpha is 0x33)     }   } }