public function initMyApp():void {
/*
//click sample
bt1.addEventListener(MouseEvent.CLICK, function(evt:MouseEvent):void {
Alert.show("gogogogo");
var tempBt:Button = evt.currentTarget as Button;
Alert.show(tempBt.label);
});
*/
bt1.addEventListener(MouseEvent.CLICK, btRotationAndAlert);
}
public function btRotationAndAlert(evt:Event):void {
var rotation:Rotate = new Rotate(bt1);
rotation.duration=5000;
var myString:String = "this is test string";
rotation.addEventListener(EffectEvent.EFFECT_END, function(evt:Event):void {
//var bt:Button = evt.currentTarget as Button;
//bt.visible=false;
bt1.visible=false;
Alert.show(myString);
});
rotation.play();
}
flex 匿名函数定义
最新推荐文章于 2020-11-23 22:31:58 发布