In my flash site there is a video player that I want to have an option of switching into full-screen mode. It's the video player that need开发者_C百科s to be set to full screen, not the whole stage. How would I go about this?
You need to set the stage.fullScreenSourceRect
property before changing to full screen mode:
stage.fullScreenSourceRect = new Rectangle(0,0,320,240);
That is the example given in the docs, but it will do what you want. Its a pretty neat function too as it enables hardware supported scaling if the users computer supports it.
In the HTML containing the Flash movie, you need to set allowFullScreen to true.
Then, within Flash, after a user clicks a button or presses a key you need to set stage.displaystate = StageDisplayState.FULL_SCREEN
http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html
精彩评论