欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

as event

程序员文章站 2022-03-15 20:33:38
...

import flash.events.MouseEvent;
import flash.events.Event;

/*stage.addEventListener(MouseEvent.CLICK,clk);
function  clk(e:MouseEvent){
		trace(e.type);
		trace(e.target.frameRate);
		trace(e.target.quality);
		
		stage.removeEventListener(MouseEvent.CLICK,clk);
}*/

var es:Event=new Event("test");
 stage.addEventListener("test",Print);
 function  Print(e:Event){
		trace(e.type);
		trace(e.target.frameRate);
		trace(e.target.quality);
}
stage.addEventListener(MouseEvent.CLICK,dispatch);
function  dispatch(e:MouseEvent){
		 stage.dispatchEvent(es);
}