Sie sind nicht angemeldet.

1

Mittwoch, 21. Januar 2009, 23:19

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:

Zitat

ERROR: loading plugin "dteodorescu/t_bebe.jpg" failed
I am doing it just like in example1.xml

Quellcode

1
2
3
4
5
6
7
8
9
10
<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:

Zitat

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?

2

Donnerstag, 22. Januar 2009, 15:55

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:
http://krpano.com/docu/xml/#krpano

e.g.

Quellcode

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


best regards,
Klaus

3

Donnerstag, 22. Januar 2009, 22:15

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

Quellcode

1
2
3
4
5
6
7
8
9
10
11
	<plugin name="pic_bebe"			 
			url="dteodorescu/bebe.jpg" 
			visible="true"
			enabled="true"
			alpha="1"
			align="center"
			height="75%"
			width="prop"
			zorder="100"
			onclick="action(hidepic,pic_bebe);"
			/>


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.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »reydan« (22. Januar 2009, 22:58)


4

Freitag, 23. Januar 2009, 09:52

Hi,

it depends on the flags you specify on the loadpano() call
if plugins were loaded or not,

have a look: - KEEPALL, KEEPPLUGINGS, ...
http://krpano.com/docu/actions/#loadpano

best regards,
Klaus

5

Freitag, 23. Januar 2009, 09:56

I use KEEPALL.

For some reason it doesn't work with MERGE for me. The screen remains black and the loading bar empty.

6

Freitag, 23. Januar 2009, 10:07

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