You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, January 21st 2009, 11:19pm

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:

Quoted

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

Source code

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:

Quoted

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

Thursday, January 22nd 2009, 3:55pm

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.

Source code

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


best regards,
Klaus

3

Thursday, January 22nd 2009, 10:15pm

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

Source code

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.

This post has been edited 1 times, last edit by "reydan" (Jan 22nd 2009, 10:58pm)


4

Friday, January 23rd 2009, 9:52am

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

Friday, January 23rd 2009, 9:56am

I use KEEPALL.

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

6

Friday, January 23rd 2009, 10:07am

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