initvars with flash viewer

  • Hello,

    I wonder why doesn't initvars work in flash mode.

    Code
    script
    embedpano({swf:"viewer/krpano.swf", xml:"iris.xml", target:"pano", html5:"auto", initvars: {mediaUrl: mediaUrl}});
    
    
    xml
    <sphere url="http://%$mediaUrl%"/>

    in html5 mode everything works fine but in flash mode %$mediaUrl% is not resolved -> ERROR: Security Error - "http://%%24mediaurl%"

  • Hi,

    the Flashplayer doesn't care about the HTML5 CORS header - the Flashplayer needs a crossdomain.xml file on the other server that allows the access. HTML5 and Flash are two different worlds ;-).

    Upload a crossdomain.xml file with the following content into the root folder of the other domain:

    XML
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
      <allow-access-from domain="*" />
    </cross-domain-policy>

    Best regards,
    Klaus

  • Hi,

    die Einstellung

    Code
    <site-control permitted-cross-domain-policies="all"/>

    in der crossdomain.xml könnte ein Problem darstellen - soweit ich weiß muss es in dem Fall dann in jedem Unterverzeichnis ebenfalls eine eigene crossdomain.xml Dateien geben.

    Versuche diese crossdomain.xml:

    XML
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
      <allow-access-from domain="*" />
    </cross-domain-policy>

    Schöne Grüße,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!