开发者

How can I load an HTML file using Flex StageView?

开发者 https://www.devze.com 2023-04-13 03:21 出处:网络
I want to display a HTML file for a mobile application using Flex Builder 4.5. The following code does not work -

I want to display a HTML file for a mobile application using Flex Builder 4.5.

The following code does not work -

      protected var webView:StageWebView开发者_如何学Python = new StageWebView();
      protected function view1_viewActivateHandler():void
   {
      if (StageWebView.isSupported)
    {
    webView.viewPort = new Rectangle(5, 80, stage.width-10, stage.height-9);
    webView.stage = this.stage;
            webView.loadURL("file:/assets/sample.html");   
                ......

I get this error - Error #2044: Unhandled ErrorEvent:. text=Load error.

I am new to actionscript and flex.


The html file cannot be loaded using webView.loadURL("file:/assets/sample.html");

I found the reason and workaround here

0

精彩评论

暂无评论...
验证码 换一张
取 消