• How can I put an image (banner) into a panaorama woithout xml file? I don´t want to use a xml file couse I work with TPLs.


    var so = new SWFObject("/espacio_cms/modulos/krpano/krpano.swf", "krpanoSWFObject", "630px", "400px", "9.0.28","#000000");
    so.addParam("allowFullScreen","true");
    so.addVariable("sphere", "{ruta}");
    so.addVariable("image.type","SPHERE");

    so.addVariable("krpano.autorotate.enabled","true");
    so.addVariable("krpano.autorotate.waittime","0");
    so.addVariable("krpano.autorotate.speed","8");
    so.addVariable("krpano.autorotate.accel","1.5");
    so.addVariable("onstart","set(autorotate.enabled,true);");

    so.addVariable("plugin.name","photo");
    so.addVariable("plugin.url","/espacio_cms/modulos/krpano/lab.jpg");
    so.addVariable("plugin.align","center");


    Won´t work :(


    Thanks in advanced !

  • Hi vayapavo, (vaya nickname *g* )

    I have played around this just for fun...
    It seems there is some mistake on your code.
    Try to use this one:

    so.addVariable("plugin.name","photo");
    so.addVariable("plugin[photo].url","/espacio_cms/modulos/krpano/lab.jpg");
    so.addVariable("plugin[photo].align","center");

    For me, it worked... but I have no idea if doing it this way it is a good practice or not.
    Perhaps Klaus can explain more here.

    remark: It seems the plugin name is "self-declared" using so.addVariable("plugin[photo]......ect
    if you let your first line as is (so.addVariable("plugin.name","photo");), then the debugger say :
    ERROR: unknown atriubate/path - plugin.name

    Hope this help.
    Salut.

  • For me, it worked... but I have no idea if doing it this way it is a good practice or not.
    Perhaps Klaus can explain more here.

    remark: It seems the plugin name is "self-declared" using so.addVariable("plugin[photo]......ect


    Hi,

    correct!

    when defined in the html, the name of the plugin will be self-declared by setting any attribute with:

    Code
    so.addVariable("plugin[name].anyattribute", ...);
    Quote

    so.addVariable("krpano.autorotate.enabled","true");
    so.addVariable("krpano.autorotate.waittime","0");
    so.addVariable("krpano.autorotate.speed","8");
    so.addVariable("krpano.autorotate.accel","1.5");

    the "krpano." prefix is not necessary, just "autorotate.enabled" and so will work too!


    best regards,
    Klaus

Participate now!

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