Realize full screen FLASH to automatically adapt to the size of the browser

Visual Design thirteen thousand four hundred and fifty-nine 14 years ago (2010-10-21)

I saw one on Baidu today FLASH adapt browser However, many people think that the problem is caused by HTML, and many people will use CSS to define it, and then add DIV. In fact, adding listener resize fullsecreen can enable Flash to automatically adapt to the browser size. Flash auto resize adaptive size as version: 2.0 scene: add movie clips and name right, bg, bottom

code:

 [CODE_LITE]  fscommand("fullscreen", "true"); Stage.scaleMode = "noScale";  Stage.align = "TL";//  function Resize(){ //Full screen display of background bg._width = Stage.width //Background width=width of the stage bg._height = Stage.height //Background height=height of stage bg._x =0 bg._y =0 //Bottom centered bottom._ x = (Stage.width-bottom._width)/2; //X coordinate of top=(width of stage top)/2 bottom._ y = Stage.height-bottom._ height; //Y coordinate of top=height of stage top //Upper right corner right._ x = Stage.width-right._ width; //X coordinate of right=width of stage - width of right right._ y =0 } Resize(); var myListener:Object = new Object(); myListener.onResize = function(){ Resize(); }; Stage.addListener(myListener); [/CODE_LITE]