Skip to main content
Inspiring
May 10, 2014
Pregunta

How to load offline HTML file (ipad, android and desktop application)

  • May 10, 2014
  • 2 respuestas
  • 1279 visualizaciones

Im trying to load HTML file form my PC using below code but got some error

package {

                import flash.media.StageWebView;

                import flash.display.MovieClip;

                import flash.geom.Rectangle;

               

                public class Main extends MovieClip {

                                // centralized StageWebView

                                private var webView:StageWebView;

                               

                                public function Main()

                                {

                                }

                               

                                // open StageWebView

                                public function LoadSWV():void {

                                                webView = new StageWebView();

                                                webView.stage = this.stage;

                                                webView.viewPort = new Rectangle(50,60,460,330); 

                                                webView.loadURL("test.html");

                                }

                               

                                // open StageWebView

                                public function CloseSWV():void {

                                                webView.stage = null;

                                                webView.viewPort = null;

                                                webView.dispose();

                                                webView = null;

                                }

                }

}

got output error

Error #2044: Unhandled ErrorEvent:. text=The protocol is not supported






I attached my “test.html” file publish setting

Este tema ha sido cerrado para respuestas.

2 respuestas

71081Autor
Inspiring
May 18, 2014

anyone have the solution for this issu

Ned Murphy
Legend
May 10, 2014

The message appears to be objecting to what's in the file.  What do the contents of the file look like?

71081Autor
Inspiring
May 11, 2014

I have 1 html file (flashtest.html) in my local PC and need to load that html file inside the page below of yellow box after pressing the ”Load URL” button. This script working well if I upload my HTML file (flashtest.html) in server but I’m looking offline solution

here is the screen short and the code if i use online html file (flashtest.html)

-------------------------------------------------------------------------------------------------------------

package {

     import flash.media.StageWebView;

     import flash.display.MovieClip;

     import flash.geom.Rectangle;

     public class Main extends MovieClip {

          private var webView:StageWebView;

          public function Main() {}

          public function LoadSWV():void {

          webView = new StageWebView();

          webView.stage = this.stage;

          webView.viewPort = new Rectangle(50,60,460,330);

          webView.loadURL("http://delta-adv.com/nav/flashtest.html");

          }

      }

}

looking for the offline solution to load HTML file (flashtest.html)