• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

stagewebview content scaling incorrectly in fullscreen mode

Explorer ,
Feb 21, 2014 Feb 21, 2014

Copy link to clipboard

Copied

I have an air application for mac and windows. In the app I use stagewebview(true) to create a stagewebview using the systems native browser. So far this all works great. The problem I get is when entering full_screen mode on windows. If I click and drag the window size bigger and smaller, everything scales correctly. If I enter into full_screen mode then the scaling is completely off. I can manually drag the window to be almost the fullscreen and it works great. As soon as I enter full_screen mode it is all off and only on the windows side. Now as I mentioned I am using the new native browser feature when creating my stagewebview. So it is using Internet Explorer. I have tested with my base os system running ie8 and ie11 with the same results.

If I had to guess it seems to be a problem with my viewport meta data in my html that works great until I enter fullscreen and then it is ignored. I tried some css with @-ms-viewport but that didn't seem to have any effect. Any ideas?

TOPICS
Development

Views

986

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 14, 2014 May 14, 2014

Copy link to clipboard

Copied

Hi JasonInfuse,


     Am also using stagewebview(true) in my app, and <renderMode> is "direct". Windows its working fine, but in mac, nothing is viewable, but everything is loaded fine. What i have missed here. Am playing html in a skinnablepopupcontainer, But, when <renderMode> is "auto" working fine in both mac, and windows. Having problem on "direct" mode only. but i couldn't set to "auto", because am using Stage3D also. How can i solve this problem. Please anyone help me..issue.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 16, 2014 May 16, 2014

Copy link to clipboard

Copied

LATEST

Damn I have been wanting to reply to this since Wednesday. Stupid Adobe Cloud failure. I haven't dealt with StageWebView before but have some ideas you could try. When entering full screen mode, you could try reseting the ".viewPort" property to be the same size as the monitor resolution. You use the Screen class for that. If you only care/assume that there is one monitor plugged into the computer, you can do this(assumes variable name of swv for your StageWebView):

swv.viewPort = Screen.mainScreen.bounds

If you want to account for multiple displays, you would get the array of Screens available through Screen.screens and check the NativeWindow X and Y positions to the X/Y positions of the available displays to know which one you should be getting the bounds of. If you pursue this route, take note that displays can have negative X/Y coordinates(primary display on right, secondary on left). I wrote a quick script which I think will cover everything. If anyone sees anything wrong, please correct me as I did this without my morning coffee. If you try the script below, don't forget your imports.

final public function getFullScreenBounds(window:NativeWindow):Rectangle {

  var rect:Rectangle = null;

  var screens:Array = Screen.screens;

  var screen:Screen;

  var i:int = 0;

  var lng:int = screens.length;

  while (i < lng) {

  screen = Screen(screens);// get the "i" screen in the Array

  // check to see if the NativeWindow is within bounds of the current screen

  if (window.x > screen.x && window.x < screen.x + screen.width && window.y > screen.y && window.y < screen.y + screen.height) {

  rect = screen.bounds;

  break;

  }

  i += 1;// increment i

  }

  return rect;

  }

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines