Skip to main content
This topic has been closed for replies.

7 replies

Abhinav_Dhandh
Adobe Employee
Adobe Employee
March 8, 2013

Hi markc888

I did try this issue with AIR 3.6.5990 build & the StageWebView loads fine for my application on both Desktop as well Device.

Below is the code which I have used :

package  {

          import flash.display.MovieClip;

          import flash.media.StageWebView;

          import flash.geom.Rectangle;

          import flash.events.KeyboardEvent;

          import flash.ui.Keyboard;

          import flash.desktop.NativeApplication;

 

          public class TestStageWebView extends MovieClip{

 

                    private var webView:StageWebView = new StageWebView();

 

                    public function TestStageWebView()

                    {

                              webView.stage = this.stage;

                              webView.viewPort = new Rectangle( 0, 0, stage.stageWidth, stage.stageHeight );

                              webView.loadURL( "http://www.adobe.com" );

                              stage.addEventListener( KeyboardEvent.KEY_DOWN, onKey );

                    }

 

                    private function onKey( event:KeyboardEvent ):void

                    {

                              if( event.keyCode == Keyboard.BACK && webView.isHistoryBackEnabled )

                              {

                                        webView.historyBack();

                                        event.preventDefault();

                              }

 

                              if( event.keyCode == Keyboard.SEARCH && webView.isHistoryForwardEnabled )

                              {

                                        webView.historyForward();

                              }

                              }

          }

}

I would request you to please share your sample application so that we could check the issue.

markc888
markc888Author
Inspiring
March 8, 2013

Thanks Adhinav,

After testing with your sample code it appears that the issue is related to rendering with GPU or Direct mode.

i.e. Set the rendering mode to Auto or CPU and the StageWebView appears. if you use GPU or Direct mode it doesn't.

FYI for my test I also have:

Aspect ratio: Landscape

Full screen not selected

Auto Orientation not selected

Device: iPad

Resolution: Standard

Please let me know if you get the same results.

Thanks,

Mark

Lars Laborious
Legend
March 8, 2013

For me it had to do with listeners and additional calls happening before initiating the webview.

By moving "webView.stage = this.stage;" up before "webView.viewPort = new Rect..." as in the example (mine was after the viewport bit and addEventlisteners), it worked both for GPU and CPU! (In previous versions of AIR it worked even if webView.stage was set after.)

Lars Laborious
Legend
March 5, 2013

Same issue here, happens on the computer and not when deployed to a phone. I've voted for your report.

Inspiring
March 5, 2013

Got my vote as well. Seems to be affecting loading pdfs too with StageWebView in the emulator.