代码
btn.addEventListener(MouseEvent.CLICK,goFullScreen);

  
function goFullScreen(event:MouseEvent):void {
   
switch (stage.displayState) {
    
case "normal" :
     stage.displayState 
= "fullScreen";
     
break;
    
case "fullScreen" :
    
default :
     stage.displayState 
= "normal";
     
break;
   }
  }

 


注:flash cs3,Ctrl+enter,这些代码没效果,直接点生成出来的swf文件即可,如果是网页,html里面allowFullScreen必须改为true

 

相关文章:

  • 2021-06-01
  • 2022-03-01
  • 2021-09-22
  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
  • 2022-02-21
  • 2021-06-13
猜你喜欢
  • 2021-11-11
  • 2021-12-26
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2022-01-28
  • 2021-10-25
相关资源
相似解决方案