hi! i’m new to this forum
i have a problem with bitmaps… what i want to do is to preload some images, then multipy them on my scene ( the files are transparent png containing clouds )
the problem is that when i copy the bitmap data to create a new cloud, i loose transparency, and i can’t get WHY :cross-eye
here’s my code
public function Cloud( cloudLoader, seed ){ //constructor for the cloud
var bitmap, bitmapData;
this._speed = this.randomSpeed( ); //set a random speed for the cloud
bitmap = cloudLoader.getContent( seed ); // returns a loader.content from one of the loaded images
bitmapData = new BitmapData( bitmap.width, bitmap.height, true ); //create the bitmap data to copy into
bitmapData.draw( bitmap ); //copy the data .. "bitmap" is a [DisplayObject (implements [URL="http://livedocs.adobe.com/flex/201/langref/flash/display/IBitmapDrawable.html"]IBitmapDrawable](http://livedocs.adobe.com/flex/201/langref/flash/display/DisplayObject.html) )
this._cloud = new Bitmap( bitmapData ); // create a bitmap from the bitmap data
this.addChild( this._cloud );
}
in one of these passage i loose transparency…
the cloudLoader.getContent is still transparent…
the this._cloud is not transparent anymore
TIA :fab: