我是第一次和StageDisplayState合作。我想知道是否有任何安全原因无法触发FULL_SCREEN状态。
在我编写的这个简单的类中,当在浏览器(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
}
}}
发布于 2011-06-01 03:51:49
根据Adobe对Stage.displayState的帮助...
全屏模式是响应用户的鼠标点击或按键而启动的;如果没有用户的输入,电影将无法更改Stage.displayState。Flash运行时将键盘输入限制为全屏模式。可接受的键包括终止全屏模式的键盘快捷键和非打印键,如箭头键、空格键、Shift键和Tab键。用于终止全屏模式的键盘快捷键有:换行(Windows、Linux和Mac)、Control+W (Windows)、Command+W (Mac)和Alt+F4。
https://stackoverflow.com/questions/6037932
复制相似问题