PDA

View Full Version : Using Timer and Autorotator ??


Cameleer
11-06-2007, 05:35 PM
I’m trying to set up something very simple where the pano opens and does a little panning and zooming, then when finished it should go into auto rotate. But with this code below I can not get the autorotator speed to change, right now it will only rotate very slowly.
Any ideas?
___________________

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

panoName = images/elephants_morning5
zoomHome = 0.9
tiltHome = -5
disableWheel=1

layer_5 = files/hotspots.swf
layer_7 = files/autorotator.swf

<autorotator>
speed = 2.7
interval = 30
pause = 1000
quality = low
</autorotator>

</parameters>
<hotspots>

<global onstart="timer+=1,4000;change:0,zoom,0.8,2000,,next01;"
next01="timer+=1,1000;change:0,pan,360,7000;change:0,tilt, 0,7000,,next02;"
next02="timer+=1,1000;change:0,pan,-70,9000;change:0,tilt,0,2000,,next03;"
next03="timer+=1,1000;change:0,zoom,1.2,6000;change:0,tilt ,0,9000,,next04;"
next04="timer+=1,1000;change:0,pan,150,3000;change:0,tilt, 0,4000,,next05;"
next05="timer+=1,1000;change:0,zoom,0.7,2000"
>
</global>
</hotspots>
</panorama>

Scott Witte
11-06-2007, 07:30 PM
Cameleer,

I don't know if your outdated code has anything to do with it but here is what I just did and it worked great:
</parameters>
<autorotator>
speed = -0.25
interval = 10
pause = 5000
quality = low
</autorotator>
<hotspots>
<global
onStart="external.autorotator.disabled=1
infoButtonHelp.visible=1
infoButtonHelp.alpha=1,400,,helpOut"
helpOut="timer+=1,3000,,helpOut2"
helpOut2="infoButtonHelp.alpha=0,300,,helpOut3"
helpOut3="infoButtonHelp.visible=0;pano.qualityStatic=low;pa no.tilt=0.00,5000;pano.pan= 1.00,4500,,move2"
move2="pano.zoom=0.85,3000,,move3"
move3="timer+=1,2000,,move4"
move4="timer=3000;infoButtonHelp.visible=0;pano.qualitySt atic=best;external.autorotator.disabled=0"
>
Note: "infoButtonHelp" is an image that appears briefly at the beginning, then fades out and then the motion starts.

I found a "trick" that helps create a smooth transition between two moves. In the helpOut3 move, since each move gets its own timer, the pan movement ends and fires the next move while the tilt move is still going. Nice effect.

Cameleer
11-07-2007, 12:32 AM
Thanks Scott,
I will have to give that a try. I had tried doing something like that in a different way and the transition between panos looked rather bad.
I still couldn’t get the auto rotate working so I made it into a loop that it keeps repeating and it looks good, much better than just the slow rotation that it had been doing!
http://www.indiavrtours.com/rajasthan.html