AS3: get browser window size?

前端 未结 2 1876
死守一世寂寞
死守一世寂寞 2020-12-21 13:38

Can I get the obtain the size of the browser window in AS3?

The best method I\'ve found is to get the size with Javascript and send it to Flash as a FlashVar. One li

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-21 13:53

    If you embedd your swf with height: 100%; width:100% you could use stage.stageWidth and stage.stageHeight. If this is not the case you could implement a communication with JavaScript by using ExternalInterface.

提交回复
热议问题