load local pano html into AdobeAIR

  • Hi
    i have an AIR app that uses HTMLLoader into mx.Accordion component
    Panoramas load good only from web, not from local html pano "wrapper"
    Any idea ?
    Here is my code:
    MXML

    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://http://ns.adobe.com/flex/spark"
    xmlns:mx="library://http://ns.adobe.com/flex/mx"
    width="1024"
    height="768"
    minWidth="900"
    minHeight="700"
    creationComplete="windowedapplication1_creationCompleteHandler(event)">
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>

    <fx:Script>
    <![CDATA[
    import mx.events.FlexEvent;

    protected var urlArray:Array=new Array("http://www.adobe.com/","http://gady.3dtour.ua/"/* -- krpano -- */,"video.html"/* - local krpano - */,"https://krpano.com/%22,%22http://google.com/")
    protected var html:HTMLLoader=new HTMLLoader();
    protected var htmlContent:Sprite=new Sprite();


    protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
    {
    }

    protected function getHTMLContent(id:int):Sprite
    {
    html = new HTMLLoader();
    html.width = 1024;
    html.height = 768;
    trace(urlArray[id]);
    var urlReq:URLRequest = new URLRequest(urlArray[id]);
    html.load(urlReq);
    var htmlContent:Sprite=new Sprite();
    htmlContent.addChild(html);
    return htmlContent;
    }
    ]]>
    </fx:Script>
    <mx:Accordion id="acc" x="0" y="40" width="100%" height="100%">
    <s:NavigatorContent width="100%" height="100%" label="ADOBE site">
    <mx:Image id="image" source="{getHTMLContent(0)}" width="100%" height="100%" horizontalAlign="center" verticalAlign="middle"/>
    </s:NavigatorContent>

    <s:NavigatorContent width="100%" height="100%" label="http://gady.3dtour.ua/">
    <mx:Image id="image1" source="{getHTMLContent(1)}" width="800" height="600" horizontalAlign="center"/>
    </s:NavigatorContent>

    <s:NavigatorContent width="100%" height="100%" label="local pano html (video.html)">
    <mx:Image id="image2" source="{getHTMLContent(2)}"/>
    </s:NavigatorContent>

    <s:NavigatorContent width="100%" height="100%" label="krpano site">
    <mx:Image id="image3" source="{getHTMLContent(3)}" width="100%" height="100%" horizontalAlign="center"/>
    </s:NavigatorContent>

    <s:NavigatorContent width="100%" height="100%" label="google">
    <mx:Image id="image4" source="{getHTMLContent(4)}" width="100%" height="100%" horizontalAlign="center"/>
    </s:NavigatorContent>
    </mx:Accordion>
    <s:Label x="0" y="9" width="100%" fontSize="25" fontWeight="bold"
    text="YOU NEED INTERNET CONNECTION TO TEST THIS APPLICATION !" textAlign="center"/>
    </s:WindowedApplication>


    ---------------------------------------------------
    All urls exept "video.html" loads ok
    In case of "video.html" - FATAL:LICENCE ERROR

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!