public class HtmlDemo
{
private static var sp:Sprite;
public function HtmlDemo()
{
Laya.init(800, 480,WebGL);
Stat.show();
sp=new Sprite();
sp.loadImage("background.jpg");
Laya.stage.addChild(sp);
Laya.stage.on(Event.CLICK,this,onClick);
function onClick():void
{
// TODO Auto Generated method stub
Laya.stage.off(Event.CLICK,this,onClick);
Laya.stage.removeChild(sp);
Loader.clearRes("background.jpg");
sp.destroy();
}
}
}
}
1 个回复
cuixueying
赞同来自: