Creating a New Bitmap Image from ImageData : BitmapData : Graphics Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Graphics » BitmapData »

 

Creating a New Bitmap Image from ImageData


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

        
        var imgData:BitmapData = new BitmapData(2020, false, 0xFF00FF00);
        imgData.fillRect(new Rectangle(551010)0xFF0000FF);
        
        var bmp:Bitmap = new Bitmap(imgData);
        
        bmp.bitmapData = imgData;
        
        addChild(bmp);
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Graphics
» BitmapData