Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
The message appears to be objecting to what's in the file. What do the contents of the file look like?
Copy link to clipboard
Copied
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)
Copy link to clipboard
Copied
anyone have the solution for this issu
Find more inspiration, events, and resources on the new Adobe Community
Explore Now