Note that there are some explanatory texts on larger screens.

plurals
  1. POHTMLLoader: Navigate Back and Forward in Page History
    primarykey
    data
    text
    <p>I never had problems navigating Back and Forward through page history of Htmlloader that was a child of the main Native Window stage. I just have to use: HtmlLoaderVariable.historyForward();</p> <p>But when i add HTMLLoader as a child to a new Native Window, it doesn't seem to work.</p> <p>Here is the code:</p> <pre><code>function createNewHtmlWindow(pageUrl:String):void{ //Everytime I click a button, this function creates a seperate Native Window each containing HtmlLoader Class to load a webpage var myhtml= new HTMLLoader(); myhtml.width = 1000; myhtml.height = 780; myhtml.addEventListener(Event.COMPLETE, myHtmlLoaded); var myHtmloptions = new NativeWindowInitOptions(); myHtmloptions.transparent = false; myHtmloptions.systemChrome = NativeWindowSystemChrome.STANDARD; myHtmloptions.type = NativeWindowType.NORMAL; var extHtmlWindow = new NativeWindow(myHtmloptions); extHtmlWindow.title="new title"; extHtmlWindow.width = 1015; extHtmlWindow.height = 800; extHtmlWindow.activate(); extHtmlWindow.stage.align = "TL"; extHtmlWindow.stage.scaleMode = "noScale"; extHtmlWindow.stage.addChild(myhtml); var backNativeWin=new BackButton(); backNativeWin.x=5; backNativeWin.y=500; backNativeWin.addEventListener(MouseEvent.CLICK, loadPrevHistory); extHtmlWindow.stage.addChild(backNativeWin); var nextNativeWin=new NextButton(); nextNativeWin.x=30; nextNativeWin.y=500; nextNativeWin.addEventListener(MouseEvent.CLICK, loadNextHistory); extHtmlWindow.stage.addChild(nextNativeWin); myhtml.load(new URLRequest(pageUrl)); } function myHtmlLoaded(e:Event):void { //Page loads successfully } function loadNextHistory(m:MouseEvent):void{ output.text="Next&gt;&gt;"+m.target.parent.getChildAt(0); //Next&gt;&gt;[object HTMLLoader] m.target.parent.getChildAt(0).historyForward(); // This line is not working } function loadPrevHistory(m:MouseEvent):void{ output.text="Prev&gt;&gt;"+m.target.parent.getChildAt(0); //Prev&gt;&gt;[object HTMLLoader] m.target.parent.getChildAt(0).historyBack(); // This line is not working } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload