Problem on changing URL of a plugin

  • I would like to reproduce the functionality found in the example for googlemaps, example1.xml where there are some spots and when the cursor is over them it shows a tiny thumbnail and when they are click a full picture is displayed.

    Unfortunately I can't make it work somehow... i always get this message:

    Quote

    ERROR: loading plugin "dteodorescu/t_bebe.jpg" failed

    I am doing it just like in example1.xml

    Code
    <hotspot name="hs_bebe"
     url="../hotspot_ani_black.swf" 
     ath="0" atv="0"
     scale="0.5"
     zoom="false"
     onover="set(url,dteodorescu/t_bebe.jpg);tween(scale,1);"
     onout="set(url,../hotspot_ani_black.swf);tween(scale,0.5);"
     onloaded="resetsize();"
     onclick="action(showpic,pic_bebe);"
     />

    The hotspot is loaded correctly when I open the website (it's the animated circle), but when I put my mouse over it... it displays the error above and it disappears. I checked and double checked.. the path to the image is correct.

    I tried usitng png instead of jpeg, I even tried doing his:

    Quote

    onover="set(url,../hotspot_ani_black.swf);tween(scale,1);"

    Practically it would reload the swf. Since the hotspot is seen correctly the first time, I know the path is correct and still it displays the same error.

    Is there anything else I should activate to make this work?

  • Hi,

    when loading the xml, the paths of all "url" attributes are relative to the xml file!

    when changing the url later in a action, this url isn't automatic relative anymore to the xml file,

    but you can use "placeholders" like %CURRENTXML% or %SWFPATH% in your url path
    to set a fullpath,

    see here for the urlpath placeholders:
    https://krpano.com/docu/xml/#krpano

    e.g.

    Code
    onover="set(url,%SWFPATH%/hotspot/hotspot_ani_black.swf);"

    best regards,
    Klaus

  • Yup ... it worked. Thanks
    Now i have another problem related to the big picture i want to display.
    I have this plugin

    If i put this code in the panorama xml it doesn't work.
    If i put it in the main xml file (which calls loadpano(panorama.xml)) it works. My logical guess is that plugins aren't loaded when i call loadpano.
    I tried doing addplugin(pic_bebe) but with no luck.

    Edited once, last by reydan (January 22, 2009 at 10:58 PM).

  • with KEEPALL the plugins from the new xml are not loaded!

    MERGE could solve this problem...

    but you can also try addplugin()
    note - you must first call addplugin() add the set all attributes manually,
    and a special note for the "url" attribute, the path there is related
    to the html file, but you can use placeholders like %CURRENTXML%
    in the path,

    best regards,
    Klaus

Participate now!

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