View Full Version : onOver works but cannot fire onClick-button
See my project (http://www.fometrix.com/walburgis_v2/fpp/walburgistower.html).
After you pressed the white arrow a map with hotspots is shown.
The onOver follows the buttons as expected. But .... I cannot click anymore.
Without the onOver things worked fine.
Please have a look at the XML-code (http://www.fometrix.com/walburgis_v2/fpp/tower01.xml) and help me going on.
Thanks,
Wout.
LepLep
08-07-2008, 03:53 PM
it looks like green dot "covers" actual clickable spots, it have depth 102 (higher than spots - 100)
Have a look at the XML-code:
<spot id="Spot1" url="images/spot.png" visible="0" alpha="0" unlinked="sp01"
static="1" staticX="155" staticY="160" salign="LT" align="LT" depth="101"
onover="mopointer.staticY=160,100"
onClick="pano.leash=free;loadPano(panoName=sp01) ;" />
If I put the depth of the onOver at the same depth (100) it is not visible (hidden below the spot).
It seems to me the onClick-action has to be linked to the onOver.
Any ideas?
siesfor
08-07-2008, 09:55 PM
hey FMX, for spots 1-4, add...
"mopointer.onClick=loadpano(panoname=<panofilename>)"
to the "onOver"s. That'll make mopointer the active click spot, and change it's onClick destination, depending on which spot it's over.
Then change mopointer's buttonMode from "0" to "1" to make it active.
At this point, you can remove the spots' individual "onClick"'s, since they won't be useful.
And since all your pano leashes appear to be "free", you can just set that between some <pano> brackets in your <hotspots> section instead of defining it with every "onClick".
Thanks sysfor,
I added the following code for every hotspot:
<spot id="Spot1" url="images/spot.png" visible="0" alpha="0" unlinked="sp01"
static="1" staticX="155" staticY="160" salign="LT" align="LT" depth="101"
onover="mopointer.staticY=160,100 mopointer.onClick=loadPano(panoname=sp01) "
/>
Now it is clickable but nothing happens. That is the pano doesn't get loaded (nothing happens)
LepLep
08-08-2008, 09:26 AM
maybe try onClick=loadPano(?panoName=path/panoname) and of course double check if pano path is correct :)
Have to set buttonMode to '1' of course.
But..... now the buttons are working I get a strange effect on the panoramas showing. Befor I could pan for 360 degrees but now it is limited to less then 180 degrees without clear reason.
Whereas the first pano even shows a straightened image insteas of a spherical pano.
What causes this undesired pan?
siesfor
08-08-2008, 04:37 PM
I checked out the site, I first went to the second pano (sp02) and it was fine, no problem, then I went to the first one, and like you said, it was mishapen and wouldn't pan, then I went back to the second and it was warped and wouldn't pan anymore either, so I checked out the picture's that were being used and noticed the wb01 pano, was only half the size of the sp02 pano, which I think might have been why it was having problems. (Although, when I tried going to wb01 first, it still didn't render it right, strange. Anyways....)
Add this and it'll take care of the problem.
<cylConverter>
vfov = 180
hfov = 360
</cylConverter>
It's just telling FPP that all of your pano's are fully 720 degrees and not to try rendering any of them as a partial pano.
And about your menu, you'll probably want to add a default "onClick" value to your mopointer spot for the first pano. Since mopointer starts out covering over the first pano's spot (spot1). and since you can't "onOver" the first spot with it covered up, it can't pass on an intial "onClick" value to mopointer.
Thanks siesfor,
these tips brought me again a next step to the running tour.
Now I have all hotspots clickable and running but.....
1. when I first click the upper hotspot, and after loading move the mousepointer to the last hotspot, the hotspots inbetween turn gray (alpha 0.6, saturation -1)
2. when I move up again the middle hotspots turn red again (hotspot 2 and 3)
It seems that the hotspot values are not properly (re-)set.
I've been trying it for hours and can't get it to work descent. :confused:
Can you help me to solve it?
siesfor
08-11-2008, 05:44 PM
hey FMX, I don't see anything wrong w/ the spots, so I'm guessing you figured it out already.
Although, I did notice where I told you wrong about the <pano> brackets. it's actually just the one bracket (d'oh!) and it needs to be located within the <global> brackets to work.
stick <pano leash="free" /> between your global brackets and the leash will be right.
I also noticed there was a space in your unlinked parameter for sp02 that was causing it not to unlink.
Nothing functional, but just some minor visual things you'll probably want to correct.
Hi sysfor,
Please check the hotspots by clicking and loading the panoґs one after each other. You will notice that gray hotspots appear in a non-sequential order.
That is the point that is still not clear to me. Could you explain the cause of it?
Thanks again
siesfor
08-12-2008, 01:07 AM
I'm not really sure what it is you mean by non-sequential.
when I clicked on the topmost hotspot (spot2), it loaded sp02 and turned grey.
when I clicked on either the 2nd or 3rd hotspot (spot3 & spot4), they loaded sp03 and turned the 2nd and 3rd hotspots grey.
and when I clicked the bottom most hotspot (spot1), it loaded sp01torengewelf and turned the bottom most spot grey.
I didn't notice anything abnormal about their sequence considering their staticY values.
The gray spots should only appear (or not at all) for the active hotspot. Default the hotspots should be red and the mousepointer is green.
When I click for example the first hotspot from the top followed by the third hotspot, also the second hotspot turns gray. When I now move the mousepointer down I suddenly have 2 gray hotspots.
So it is not the movement of the green mousepointer but exactly the gray spots of which one and only one can be visible at any time.
For simplicity it would even be okay to only have the red hotspots always visible and the green mousepointer just as the clickable pointer.
siesfor
08-12-2008, 04:21 PM
well for the middle 2 spots, they both turn grey since they're both "unlinked" for sp03, and they both lead to sp03. Since they both do the same thing, you should probably just remove one of them altogether.
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.