FLASH AS3在点击时更改位图

时间:2012-12-11 00:55:46

标签: actionscript-3 flash papervision3d

我希望本网站上有许多有用的FLASH天才可以共享更新此示例代码中位图所需的代码位:http://www.flashmo.com/preview/flashmo_096_3d_cylinder_box 单击时,我希望在点击事件中将任何图片(位图)更改为其他内容(另一个位图)。
非常感谢您提供的任何帮助!!

1 个答案:

答案 0 :(得分:0)

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();
});

这可以给你一个我认为的想法。