0 Replies Latest reply on Jul 3, 2011 7:34 PM by Cool Wind

    local html file path setting

    Cool Wind

      Hi,

       

      I tried to use StageWebView to load a local index.htm which is saved in "src/assets" folder for Flex 4.5 mobile.

      I've tried different path settings but all failed. Please help, thanks!

       

       

      protected var webView:StageWebView = new StageWebView();

       

      protected function onViewActivate(event:ViewNavigatorEvent):void

      {

        webView.stage = stage;

        webView.viewPort = new Rectangle(20, 100, 450, 450);

        webView.addEventListener(LocationChangeEvent.LOCATION_CHANGE,onURLChange);

        // StageWebView can't load the html file.

        // webView.loadURL("file://assets/index.htm"); 

        // webView.loadURL("assets/index.htm");  

        addEventListener(ViewNavigatorEvent.REMOVING,onRemove);

      }