You are not logged in.

vayapavo

Beginner

  • "vayapavo" started this thread

Posts: 4

Location: Gijón

  • Send private message

1

Tuesday, September 1st 2009, 2:22pm

Banner without XML

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 !

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

2

Tuesday, September 1st 2009, 8:00pm

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.

vayapavo

Beginner

  • "vayapavo" started this thread

Posts: 4

Location: Gijón

  • Send private message

3

Wednesday, September 2nd 2009, 9:33am

Hi Michel ( de tanto decir "vaya pavo!!" me quedé con la frase *tongue* )



Thanks so much for the answer!! It Works OK *smile*



Saludos!!

4

Wednesday, September 2nd 2009, 10:55am

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:

Source code

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


Quoted

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