Question

I'm hoping one of the many helpful FLASH genius' on this site can share the code bit necessary to update the bitmap in this sample code: http://www.flashmo.com/preview/flashmo_096_3d_cylinder_box When clicked I want to have any of the picture's (bitmap) changed to something else (another bitmap) upon the click event.
Thank you greatly for any assistance you can provide!!

Était-ce utile?

La solution

var ExampleBitmapData:BitmapData = ExampleBD();
var anotherBitmapData:BitmapData = anotherBD();

var bitmap_Holder:Bitmap;

bitmap_Holder.bitmapData = ExampleBD();

stage.addChild(bitmap_Holder);

stage.addEventListener(MouseEvent.MOUSE_CLICK, function(event:MouseEvent):void{
bitmap_Holder.bitmapData = anotherBD();
});

this can give you an idea i think.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top