PDA

View Full Version : Correct syntax...


le GROS jйjй
09-30-2008, 02:32 PM
Hi, first of all excuse my english, am french...
I have made a tour with about 10 panoramas wich are all called by a function(am I right ?) :
entree= "pano.leash=free;loadPano(panoName=entree/entree&zoomHome=0.9&panHome=-36&tiltHome=5);external.ia_ambientmix.mix=birds:1"
allee= "pano.leash=free;loadPano(panoName=allee/allee&zoomHome=0.9&panHome=23&tiltHome=-5);external.ia_ambientmix.mix=birds:1;"
technique= "pano.leash=free;loadPano(panoName=technique/technique&zoomHome=0.9&panHome=-95&tiltHome=0);external.ia_ambientmix.mix= birds:1"

and then :

<spot id="cible_entree"
onPress="entree;mapfade"
/>
for example.

Now I would like to call a preview before but when I do so, only the preview is loaded and not the full pano :

entree = "pano.leash=free
loadPreview()
loadPreview=loadPano(?panoName=petit/entree
onTransitionEnd=loadMain())
loadMain=loadPano(?panoName=entree/entree)
onTransitionEnd=;"

I guess my code is not good, but I can't find the way to make it work...
Can someone help me please ??!!!

siesfor
09-30-2008, 04:18 PM
hey there, your problem is that you have both functions inside one set of quotation marks.
here's your original code with the added quotation marks in red.

entree = "pano.leash=free
loadPreview()
loadPreview=loadPano(?panoName=petit/entree
onTransitionEnd=loadMain())"
loadMain="loadPano(?panoName=entree/entree)
onTransitionEnd=;"

le GROS jйjй
10-01-2008, 08:38 AM
Thanx siesfor, but I still have a problem...
I wrote these actions:
entree = "loadPano(?panoName=petit/entree);onTransitionEnd=loadMain_entree()"
loadMain_entree="loadPano(?panoName=entree/entree);onTransitionEnd=;"

bambou = "loadPano(?panoName=petit/bambou);onTransitionEnd=loadMain_bambou()"
loadMain_bambou="loadPano(?panoName=bambou/bambou);onTransitionEnd=;"

And I call the first one with :
onStart="entree;"

Wich works, but then when I try to call the second function (bambou) or even the first one (entree) it loads only the preview pano (petit/entree) and don't execute the onTransitionEnd=loadMain_entree()"

I really don't understand why !!!
Does any one have a solution please !!! Many thanx !

le GROS jйjй
10-01-2008, 09:38 AM
Ok, I've got it !
I was calling the function this way:
<spot id="cible_bambou"
onPress="bambou"
/>
And I it should have been like this :
<spot id="cible_bambou"
onPress="global.bambou"
/>