PDA

View Full Version : initial pan & tilt


panostar
03-27-2007, 06:54 PM
Hi there!

I am trying to blend over to another pano with this command:

<spot static="1" ... onClick="loadPano(?panoName=images/pano)" />

How can I set the initial pan and tilt? i can do it the other way, but i would like to keep the panos in a subdirectory.

The onLoad event doesn't help, because the pano first finishes loading and then all of the sudden jumps to the coordinates.

thank you very much for any assistance you might be able to offer.

c*

jaaaab
03-28-2007, 08:18 AM
hello

i didn't test it, but maybe you could try something like this:

after your loadPano command, try to use onNewPano or onTransitionEnd event or something alike the tutorial provides.

Gives something like this:

"onNewPano event, fires when pano2 object created and new panorama starts to load"

<global onNewPano="pano2.tiltHome=90" >

or

onTransitionEnd=YourPanoName.tiltHome=yourTilt;

christophe
03-28-2007, 02:46 PM
Hi !
Try this
loadPano(nature.swf?panHome=100&tiltHome=-10)

panostar
03-28-2007, 07:46 PM
thank you very much for your help.

it does not work - i tried it with another parameter "disableWheel=1" - does not work as well.

christophe, maybe same prob with xml-parameter...

any other ideas?

Denis
03-29-2007, 02:56 PM
Hi !
Try this
loadPano(nature.swf?panHome=100&tiltHome=-10)

Yes. this is correct.
But note, that new pano is linked to the old one (equal pan/tilt/zoom), so if you want to set the new pano into another position, use leash="free" or leash="follow"). I.e. the full command is here:
pano.leash=free;loadPano(nature.swf?panHome=100&tiltHome=-10)

If you write in your XML beforehand:
<pano leash="free" />
(make leash="free" for all new panoramas)
Cristopher's line will work without any additions.

Jaaaab's method is good as well, use it like this:
<global setPosition1="pano.pan=100;pano.tilt=10" setPosition2="pano.pan=90;pano.tilt=-10">
<spot if="1" onClick="
loadPano(nature.swf);
global.onTransitionEnd=setPosition1();
" />
<spot if="2" onClick="
loadPano(snow.swf);
global.onTransitionEnd=setPosition2();
" />
This works with pan/tilt instead of panHome/tiltHome. You can make smooth transition to the new position: setPosition1="pano.pan=100,1000;pano.tilt=10,1000"

panostar
03-29-2007, 06:37 PM
Thank you very much for helping!

Okay, I have tried to implement it like this:

<spot static="1" staticAlign="LT" staticX="120" staticY="330" url="images/house_thumbnail.jpg" onClick="pano.leash=free; loadPano(?panoName=images/house?panHome=180&tiltHome=-30)" />


I am using the stripe-format. Maybe it is a problem with that?

I do not really want to create an xml-file for every single transition. Maybe you could have another look?

Denis
03-30-2007, 04:41 AM
Only one fix:

<spot static="1" staticAlign="LT" staticX="120" staticY="330" url="images/house_thumbnail.jpg" onClick="pano.leash=free; loadPano(?panoName=images/house&panHome=180&tiltHome=-30)" />


:)

panostar
03-30-2007, 09:45 PM
ups - yes, thank you!

but now it sets pan and tilt to 0 -> so it starts at it's initial (zero) position. does not matter what settings for the variables i use (eg pan=90&tilt=-90) ... tested with ff 2 and ie 6...

could you look once more an maybe test it with the stripe-format?

Denis
03-31-2007, 05:35 AM
It works for me (and for stripes too). Possible you have some additional panHome/tiltHome values in XML file? Give me an URL and I will tell you for sure.

panostar
04-10-2007, 10:51 AM
thank all of you - it is now working---

while

<spot static="1" staticAlign="LT" staticX="120" staticY="330" url="images/house_thumbnail.jpg" onClick="pano.leash=free; loadPano(?panoName=images/house&panHome=180&tiltHome=-30)" />


did not work for me, finally

<spot static="1" staticAlign="LT" staticX="120" staticY="330" url="images/house_thumbnail.jpg" onClick="pano.leash=free;loadPano(?panoName=images/house&panHome=180&tiltHome=-30, 1000, fade)" />

got it going.

Thanks again!