PDA

View Full Version : Make a panorama move on set path?


asmilie2b3
09-30-2007, 06:26 AM
I wish to have a panorama move on a set course when it loads. Really just to start zoomed in, and it zooms out, then it autorotates.
I'm fine with the autorotation, but how to get a panorama to move on a set course (start zoomed in, and zoom out)? I am not using a transition from another panorama, and in that case is it possible?
Would really appreciate any advice or a point in the direction of something similar.

Scott Witte
09-30-2007, 08:02 PM
Sounds like you may already understand how to script movements as part of a transition. If not it is described in the "motion tweens" section of the tutorial. Just fire the same list of instructions with an onLoad function in the global section of the hotspots parameters.

zleifr
09-30-2007, 08:13 PM
Not too hard:

In the xml right after global put this in:

onStart = "pano.zoom=3,800,,,;"

The "3" is how far to zoom in, the "800" is the time to complete the zoom, and I forget what other options you could specify between the other commas, a quick search here should yield the answer.

Also, you will need to appropriately set:

zoomHome = 0
zoomMax=3
zoomMin=0

so this setup would zoom from 0 to 3 magnification in 800 time units when you load the pano. You might need to explicity start the autorotator right after the zoom with the onStart event, or you could play with the autorotator's time in the <autorotator> section of the xml.

That should do it.

Here's a sample of xml that does a similar thing (tilts up and zooms in onStart):

<?xml version='1.0'?>
<panorama>
<parameters>

disableLoading = 1
loaderTextColor = #000000
loaderBackColor = #282828
loaderText=%3Cfont%20face%3D%27Arial%27%20size%3D% 2730%27%20color%3D%27%23%240%27%3ELoading%3A%20%24 7%3C%2Ffont%3E

segments="25"
behaviour="1"
qualityStatic="high"
qualityMotion="medium"

panHome=0
tiltHome=-90
zoomHome = 0
zoomMax=3
zoomMin=0

layer_2 = ../fpp/files/borders.swf
layer_3 = ../fpp/files/hotspots.swf
layer_4 = ../fpp/files/autorotator.swf
/* layer_7 = ../fpp/files/editor.swf */

</parameters>

<borders>
</borders>

<autorotator>
speed = -0.07
interval = 30
pause = 2000
quality = low
</autorotator>

<hotspots>
<global LocalConnectionID="lc_test"

onStart = "loadMain();"

loadMain = "
loadPano(?panoName=images/01Front_and_Street/01Front_and_Street,600);
01Front_and_Street_cpn.visible=1;
onTransitionEnd=hideDock();
pano.tilt=0,600;
pano.zoom=.5,800,,,;
"

asmilie2b3
10-06-2007, 04:50 AM
Many many thanks for the information.
Zleifr I gave it a try , but that is the first I saw of the "<Global>" section, I am unsure of the syntax. I don't see any mention in the 2.1 tutorials for global, or montion tweening..
Also I can never get this form to deliver a search result, I'm always told that I am under the minimum 4 words to search, even if I have more than 4!)

If someone could point me in the right direction to the motion tweening documentation would much appreciate.

Many thanks
Bruce

Scott Witte
10-06-2007, 08:03 AM
If someone could point me in the right direction to the motion tweening documentation would much appreciate.
In the tutorial under hotspots plugin, Syntax of Hotspots parameters section 4, "animation and motion tweens". You may need to read it more than once but pretty much everything is there.

zleifr
10-06-2007, 02:46 PM
Hi,

Scott's answer should get you there, too. I just took the top, very small piece of that xml. The key bit is this:

onStart = "loadMain();"

loadMain = "
loadPano(?panoName=images/01Front_and_Street/01Front_and_Street,600);
01Front_and_Street_cpn.visible=1;
onTransitionEnd=hideDock();
pano.tilt=0,600;
pano.zoom=.5,800,,,;
"

Putting onStart in the xml tells fpp that you have commands for it run when it is fully loaded and ready to start. Which in your case would be to zoom out, so you will need to set zoomHome all the way in, and zoomMax equal to zoomHome less than or equal to where you want to zoom out. If you need a full xml file using global you can modify this one:
http://advancedvirtualtours.com/params.xml

And if that doesn't get you there, post a link to the panorama, and I will post the xml that will do what you need.

asmilie2b3
10-14-2007, 09:55 AM
Zliefr,

Thanks for the very in depth info. Unfortunately even with reading the hotspots section (many times more than twice), and trying your sample I am at a loss. I've tried adjusting it in many ways but anything I do and the panorama will not appear, so I'm doing something illegal with the syntax.
If I could take you up on your kind offer to put it into the xml, it would be a big leg up.
Here is the panorama
http://z-it.jp/bloomhall/pano1.html
And the xml
http://z-it.jp/bloomhall/pano1.xml

cheers
Bruce