0
我正在第一次使用StageDisplayState。我想知道是否有任何安全原因不能触发FULL_SCREEN状态。试图自动触发StageDisplayState
在浏览器(firefox-mac)中查看的这个简单类中,定时器事件FULL_SCREEN不会触发,而鼠标事件则会触发。有什么有用的见解吗?
感谢
package {
import flash.display.StageDisplayState;
import flash.display.Sprite;
import flash.events.TimerEvent;
import flash.events.MouseEvent;
import flash.utils.Timer
public class AutoFullScreenTest extends Sprite {
private var timer:Timer = new Timer(1000,5)
public function AutoFullScreenTest() {
timer.addEventListener(TimerEvent.TIMER_COMPLETE,timehandle)
stage.addEventListener(MouseEvent.MOUSE_DOWN,mousehandle)
timer.start()
}
private function timehandle(ev:TimerEvent):void{
timer.stop()
stage.displayState=StageDisplayState.FULL_SCREEN
}
private function mousehandle(ev:MouseEvent):void{
stage.displayState=StageDisplayState.FULL_SCREEN
}
}
}