How do I get the dimensi开发者_如何学Pythonons of the monitor the user is watching the video with if they have dual monitors? If I use this --
mc_videoDisplay.height = (Capabilities.screenResolutionY - 26);
mc_videoDisplay.width = Math.floor(mc_videoDisplay.height * 16 / 9);
it's only using the primary monitor so it's all out of whack if they're watching on the extended monitor.
Thanks
Rather than getting the screen resolution from Capabilities, could you just use the stage width and height?
this.stage.stageWidth
this.stage.stageHeight
If you're going to do this, make sure to set the scaleMode to StageScaleMode.NO_SCALE or else the stageWidth and stageHeight will remain constant (and only the scale will change.)
From: http://livedocs.adobe.com/flex/3/html/help.html?content=05_Display_Programming_10.html :
If the scaleMode property is set to StageScaleMode.NO_SCALE, the Stage's stageWidth and stageHeight properties change to reflect the size of the screen area occupied by the SWF (the entire screen, in this case);
Make sure you are targeting FP10.2:
Support for full screen mode with multiple monitors
Full screen content will remain in full-screen on secondary monitors, allowing users to watch full-screen content while working on another display.
Then, stageWidth
and stageHeight
would work.
精彩评论