私は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
}
}
}