引用:
package {
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.events.FullScreenEvent;
import flash.display.StageDisplayState;
public class fullScreen extends Sprite {
public var full:Boolean;
public function fullScreen() {
init();
}
private function init() {
var _btn:Sprite=new Sprite();
_btn.graphics.beginFill(0xFF0000);
_btn.graphics.drawRect(0,0,200,100);
_btn.graphics.endFill();
addChild(_btn);
_btn.addEventListener(MouseEvent.CLICK,_fullScreen);
//myBtn.addEventListener(MouseEvent.CLICK,_fullScreen);
full=false;
}
private function _fullScreen(event:MouseEvent) {
if (!full) {
trace("aaa")
stage.displayState=StageDisplayState.FULL_SCREEN;
full=true
} else {
stage.displayState=StageDisplayState.NORMAL;
full=false;
}
}
}
}
比如这个as是利用as画了一个Sprite然后去侦听,fla文档类里输入这个类名
如果我用FLASH 工具非AS画了一个按钮 然后去侦听,要写成类,应该怎么写?