PDA

View Full Version : Hotspot reacts only once: Why?


phberlin
02-09-2008, 10:54 PM
Hello everybody,

I have a coding problem which can surely be solved by the wink of an eye if I only knew what's wrong here :confused:... I'm trying to do a simple thing: Inside the pano, I place a photo as distorted hotspot box; if you click it, the background gets blurred and the photo is enlarged so that it can be viewed better. If you click on it again, the whole thing goes backwards: The photos is rescaled and background gets unblurred.

Well, this works perfectly -- except that it only works once :confused:?! If the photo was clicked at, showed up large, and clicked at again so that everything is again like it was, the hotspot doesn't respond any longer. You still get the "hand cursor" when you hover over the photo, but clicking on it doesn't cause anything any longer..

Where's my mistake? I'd be grateful for every hint since I'm rather new to FPP coding and hope that my problem is a minor issue?

Here's the XML I use:

<?xml version="1.0" ?>
<panorama>
<parameters>
loaderText = %3Ctextformat%3E%3Cfont%20face%3D%27Arial%27%20siz e%3D%2715%27%20color%3D%27%23%240%27%3E%0DDas%20Pa norama%20wird%20geladen%3A%20%09%247%0D%3C%2Ffont% 3E%3C%2Ftextformat%3E
layer_1=hotspots.swf

panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg

qualityMotion=low
qualityStatic=best
behaviour=2
sensitivity=100
threshold=0.0000001
friction=0.85
</parameters>

<hotspots>
<global>

<box id="bild_hs" url="bild.jpg" pan="-59.00" tilt="6.00" distance="0.85" depth="0" blendMode="normal"
onClick="zeigBild()"

zeigBild="
pano.blur=14,100
pano.tilt=0,100
pano.pan=-59,100
pano.zoom=0.45,100
bild_hs.scale=2,250
onClick=bildWeg()
"
bildWeg="
bild_hs.scale=1,100
pano.blur=0,100
"
/>

</global>
</hotspots>
</panorama>

Thanks in advance for any suggestion :)
Phberlin

cheathamlane
02-09-2008, 11:34 PM
<box id="bild_hs" url="bild.jpg" pan="-59.00" tilt="6.00" distance="0.85" depth="0" blendMode="normal"
onClick="zeigBild()"

zeigBild="
pano.blur=14,100
pano.tilt=0,100
pano.pan=-59,100
pano.zoom=0.45,100
bild_hs.scale=2,250
onClick=bildWeg()
"
bildWeg="
bild_hs.scale=1,100
pano.blur=0,100
"
/>



Maybe FPP doesn't speak German?

:-P

Try the below:

<box id="bild_hs" url="bild.jpg" pan="-59.00" tilt="6.00" distance="0.85" depth="0" blendMode="normal" onClick="zeigBild()"

zeigBild="
pano.blur=14,100
pano.tilt=0,100
pano.pan=-59,100
pano.zoom=0.45,100
bild_hs.scale=2,250
onClick=bildWeg()
"
bildWeg="
bild_hs.scale=1,100
pano.blur=0,100
onClick=zeigBild()
"
/>

phberlin
02-10-2008, 01:47 AM
Maybe FPP doesn't speak German?

:-P

Try the below: [snip]


Hello cheathamlane,

thanks a lot, that perfectly solved it! :D Man, that's just so logical, unbelievable I didn't have that idea myself... Really, I'm very grateful -- this helps me to get one step further with my coding "skills" :) Besides, so it's as well proofed that FPP understands German since this was obviously not the problem, haha..

Hhm, I'd like to ask a second question (maybe it's already been answered somewhere here in the forum, but I couldn't find an appropriate thread): When using "smooth" behaviour, the defined hotspot actions are not processed correctly (especially the pan-/tilt-commands) if the pano hasn't fully stopped panning (e.g. if the hotspot is clicked while the pano still moves a little). How can I stop the panning by command as part of the hotspot's action, or in other words: How can I make sure all commands are processed properly?

Thanks to everyone who's willing to help others in this forum!
Phberlin

phberlin
02-10-2008, 12:29 PM
Hhm, I'd like to ask a second question (maybe it's already been answered somewhere here in the forum, but I couldn't find an appropriate thread): When using "smooth" behaviour, the defined hotspot actions are not processed correctly (especially the pan-/tilt-commands) if the pano hasn't fully stopped panning (e.g. if the hotspot is clicked while the pano still moves a little). How can I stop the panning by command as part of the hotspot's action, or in other words: How can I make sure all commands are processed properly?

Solved it myself: Indeed it's necessary to stop the panorama's movement instantly. To do this, just add

pano.pan_v=0
tilt_v=0

in the respective hotspot action and everything works fine :)

Regards, Ph.