PDA

View Full Version : Aaargh! Can't set zoom, pan, tilt in loadPano!


adriansalisbury
04-02-2007, 06:12 PM
I've spent my first day playing with this and though I was getting on pretty well considering I'm a complete novice at this.

For the last 2 hours I've been trying different combinations to set the initial view and zoom of linked panos.

Here's the block of code in question and below is the link to the tours.

<spot id="chelsea" pan="-140" tilt="-10" url="images/black_p.png" linked="images/sussex-6000" onClick="pano.leash=free;loadPano(?panoName=images/chelsea-6000&panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg 1000, fade)" />
<spot id="salisbury" pan="-110" tilt="-5" url="images/black_p.png" linked="images/sussex-6000" onClick="pano.leash=free;loadPano(?panoName=images/salisbury-6000&panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg 1000, fade)" />


<spot id="sussex" pan="-15" tilt="-5" url="images/black_p.png" linked="images/chelsea-6000" onClick="pano.leash=free;loadPano(?panoName=images/sussex-6000&panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg 1000, fade)" />
<spot id="winchester" pan="129" tilt="-5" url="images/black_p.png" linked="images/chelsea-6000" onClick="pano.leash=free;loadPano(?panoName=images/winchester-6000&panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg 1000, fade)" />
<spot id="salisbury" pan="-175" tilt="-8" url="images/black_p.png" linked="images/chelsea-6000" onClick="pano.leash=free;loadPano(?panoName=images/salisbury-6000&panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg 1000, fade)" />


<spot id="sussex" pan="-15" tilt="20" url="images/black_p.png" linked="images/salisbury-6000" onClick="pano.leash=free;loadPano(?panoName=images/sussex-6000&panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg 1000, fade)" />
<spot id="winchester" pan="129" tilt="-5" url="images/black_p.png" linked="images/salisbury-6000" onClick="pano.leash=free;loadPano(?panoName=images/winchester-6000&panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg 1000, fade)" />
<spot id="chelsea" pan="-175" tilt="-20" url="images/black_p.png" linked="images/salisbury-6000" onClick="pano.leash=free;loadPano(?panoName=images/chelsea-6000&panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg 1000, fade)" />

<spot id="salisbury" pan="129" tilt="-5" url="images/black_p.png" linked="images/winchester-6000" onClick="pano.leash=free;loadPano(?panoName=images/salisbury-6000&panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg 1000, fade)" />
<spot id="chelsea" pan="-175" tilt="-20" url="images/black_p.png" linked="images/winchester-6000" onClick="pano.leash=free;loadPano(?panoName=images/chelsea-6000&panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg 1000, fade)" />

www.opticalfx-testsite.co.uk/clients/julianchristian/sussex.html

I should explain the names of the homes. The initial one is the sussex, the next one nearest is the chelsea and the one to the right of that in the distance is the salisbury.

I understand I have to write it out this long way as PTGui gives me cube faces with numbers rather than letters, is that right or am I making hard work of this?

Phase 2 will be to put a menu fixed to the right side so you can jump into any home but I want to beat this first. Your help will be very much appreciated.

By the way, this player is fantastic, just what I've been waiting for!

jaaaab
04-02-2007, 10:15 PM
hi!

i think your answer is here: http://www.flashpanoramas.com/forum/viewtopic.php?t=113

adriansalisbury
04-03-2007, 07:05 AM
I did try the suggested options there several times. I am unsure where to add what I believe is the missing command "&panHome=180&tiltHome=-30"
none of these work

onClick="pano.leash=free;loadPano(?panoName=images/chelsea-6000&panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg&panHome=180&tiltHome=-30 1000, fade)" />

onClick="pano.leash=free;loadPano(?panoName=images/chelsea-6000&panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg 1000, fade&panHome=180&tiltHome=-30)" />

onClick="pano.leash=free;loadPano(?panoName=images/chelsea-6000&panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg 1000, fade?pan=-90

I guess the main problem is me not really understanding the syntax.
the 'panoSuffixes' command is what makes mine look diferent to the tutorial examples, is the fault here? Is there another way around this?
What stitching programmes export with lettered faces?

Can anybody spot the problem?

adriansalisbury
04-03-2007, 08:19 AM
:oops: think I just spotted it, I have a global setting <pano pan="90" tilt="-2" zoom="0.9"/> which I guess stops all other setttings?

Sorry about that, it's a steep learning curve for me!

jaaaab
04-03-2007, 11:20 AM
this one works for me:

onClick="
pano.leash=free;
loadPano:pano.swf?panoName=MYPANONAME&panHome=20,-,stripes,2000;
"

just try to add you suffixes params at last position after panHome, maybe it should work now.

Denis
04-04-2007, 07:43 PM
onClick="pano.leash=free;loadPano(?panoName=images/chelsea-6000&panoSuffixes=_0.jpg|_1.jpg|_2.jpg|_3.jpg|_4.jpg|_5 .jpg&panHome=180&tiltHome=-30 1000, fade)" />

Yes. it's almost correct. Use:
onClick="pano.leash=free;loadPano(?panoName=images/chelsea-6000&panHome=180&tiltHome=-30, 1000, fade)" />
Need "," between 30 and 1000. And do not set panoSuffixes every time. Your first panorama has default _0.._5 so all other panorama will have the same panoSuffixes value. This will simplify your code.

adriansalisbury
04-25-2007, 06:55 AM
thanks guys :)