ActionScript 3按钮

时间:2013-01-19 20:35:48

标签: actionscript-3 flash button fullscreen

我想按下按钮时会全屏显示。

import flash.display.Stage;
import flash.display.StageDisplayState;

buttonfullscreen.onRelease = function()
{
stage.displayState = StageDisplayState.FULL_SCREEN;
}

出了什么问题?

1 个答案:

答案 0 :(得分:0)

它确实应该是

   buttonfullscreen.addEventListener(MouseEvent.CLICK, fullScreen); 

     function fullScreen(event:MouseEvent):void {
        stage.displayState=StageDisplayState.FULL_SCREEN;
   }