PDA

View Full Version : Virtual Tour without Mouse Click?


neither
11-18-2007, 07:50 AM
for example:

the pano will autorotation sometimes move up and sometimes move down (just like: http://www.cheathamlane.net/index.php?section=projects ),andthen zoom in without mouse click to another panorama??


without mouse click to another panorama,how to write it?


thanks !


:D

zleifr
11-19-2007, 03:01 AM
Well, if patrick has written the sort of thing you are looking for, then I suggest looking at his xml and learning from it...

you can do that sort of thing with functions and timers and the onDone function you can apply. you start with the onstart="" function and work your way through all the movements, from one function to the next, and sometimes a timer is invaluable.

hope that helps

cheathamlane
11-19-2007, 04:15 AM
Hi there:

First off, everything FPP I learned from the forums here... That is, users just like you and me... :)

<spot
id="my_autopresentation"
static="1"
sAlign="rb"
staticX="10"
staticY="10"
url="images/path/to/myCoolButton.png"
blockMouse="1"

onOver=""
onOut=""

onClick="goTimer();"

goTimer="timer+=1,1000,,move1;my_autopresentation.onClick=s topTimer;"

stopTimer="timer=0;pano.qualityStatic=high;move1=;move2=;move 3=;move4=;move5=;move6="

move1="pano.pan=-23,1900;pano.tilt=-28,1900;pano.zoom=.66,1900,,my_autopresentation.dw ell1; pano.qualityStatic=low"
dwell1="timer+=1,0,,my_autopresentation.move2; pano.qualityStatic=high"

move2="pano.pan=-62,1900;pano.tilt=-3,1900;pano.zoom=.66,1900,,my_autopresentation.dwe ll2; pano.qualityStatic=low"
dwell2="timer+=1,1900,,my_autopresentation.move3; pano.qualityStatic=high"

move3="pano.pan=-150,1900;pano.tilt=-2,1900;pano.zoom=.45,1900,,my_autopresentation.dwe ll3; pano.qualityStatic=low"
dwell3="timer+=1,1000,,my_autopresentation.move4; pano.qualityStatic=high"

move4="pano.pan=210;pano.pan=101,1900;pano.tilt=0,1900;pa no.zoom=.67,1900,,my_autopresentation.dwell4; pano.qualityStatic=low"
dwell4="timer+=1,0,,my_autopresentation.move5; pano.qualityStatic=high"

move5="pano.pan=-2,1900;pano.tilt=-4,1900;pano.zoom=.67,1900,,my_autopresentation.dwe ll5; pano.qualityStatic=low"
dwell5="timer+=1,1000,,my_autopresentation.move6; pano.qualityStatic=high"

move6="pano.pan=-23,1900;pano.tilt=-28,1900;pano.zoom=1.1,1900,,my_autopresentation.dw ell6; pano.qualityStatic=low"
dwell6="timer+=1,0,,my_autopresentation.move1; pano.qualityStatic=high"
/>

This is an example from the SFCM tour at the main page of my site. Basically what you do is set up a series of functions (move, dwell) which tell your panorama what pan/tilt/zoom to move to (move), and how long to pause at this new location (dwell). Note that "move" and "dwell" are just arbitrary names; you could call your functions anything you want.

So, I have a set of functions (move1, dwell1, move2, dwell2, etc). The move functions set the new pan/tilt/zoom, and how long each movement should take. For example:

move1="pano.pan=-23,1900;pano.tilt=-28,1900;pano.zoom=.66,1900,,my_autopresentation.pa use1; pano.qualityStatic=low"

move1 tells the pano to pan from its current location to -23 degrees in 1.9 seconds; at the same time it tilts to -28 and zooms to .66 within 1.9 seconds. Notice that at the end of the zoom part it names another function. This is part of the standard Flash/FPP syntax, which lets you do something else when you're finished with the first thing ("onDone").

So, when move1 has gone through its pan/tilt/zoom movements, it calls on dwell1. The dwell function will let us pause, if we want, or do something else like show a picture, or anything else we want to do before swinging the panorama to the next pan/tilt/zoom. For this presentation, it just waits for a second or so, then moves on (by calling move2).

Notice that I set and reset the pano's quality while going through the presentation... This is an effort to make the movements as fluid as possible (qualityStatic=low), but with good image quality while paused (qualityStatic=high)

If you follow through the presentation, you'll see that dwell6 calls on move1. This simply starts the cycle again.

Lastly, if you click the hotspot again, it will stop the auto-presentation. This is because, when you clicked it the first time, goTimer() told the new onClick to become stopTimer -- that is, "zero out" the timer and the presentation movement functions. You'll need to get creative about how you start/stop/restart the timer and functions. I chose to create a set of "dummy" functions, which get set to "empty" when the timer is stopped, and then set to move1/dwell1/move2/etc when the timer is started.

--
this is a simple example, where all the pan/tilts/zoom movements take the same amount of time. You could get a bit more creative than me and make (for example) the tilt transition take longer in one of the movements. The zoom onDone would kick in while the tilt was still going on -- which could be a neat effect.

HTH,

panomir
11-19-2007, 08:28 AM
Hi Patrick,
very cool example, thanks for the explanations.
Is there a way to load automatically a second pano, then to start again with the first one, in loop… ?

cheathamlane
11-19-2007, 02:49 PM
Hi Patrick,
very cool example, thanks for the explanations.
Is there a way to load automatically a second pano, then to start again with the first one, in loop… ?

Well, similar to the code here, which calls another function at the end of the zoom transition:
pano.zoom=.66,1900,,my_autopresentation.dwell1

...You could call a loadPano() function instead of the next pan/tilt/zoom movement.

As far as restarting the presentation -- you might check the documentation for onTransitionStart and onTransitionEnd. onTransitionEnd might be a good place to start the show.

neither
11-20-2007, 02:06 AM
hi,cheathamlane thanks for your explanations, i'll try it!

thank you!

neither
11-20-2007, 09:03 AM
hi,cheathamlane:

i'm so sorry,my pano can move just like your example ,after move6 the pano will start again (mov1-mov6), but i need,after move6 my pano will change to another pano without mouse click,how to write it ? thank you !

i'm very sorry,i have a bad english,hope you can understand me :)

thank you!

panomir
11-20-2007, 10:49 AM
thank you Patrick, I'll give a try.
neither : your question is similar to mine (in this post)

zleifr
11-20-2007, 01:46 PM
neither and panomir: last line of mov6 should be a loadPano command: loadPano(?panoName=path/2/pano, 500, fade)

and since your next question is going to be how to continue the motion after the new pano has loaded, the answer is to use onTransitionEnd = "nextMovFunct" ie mov6 is like this:

mov6 = "
commands .... ;
loadPano(?panoName=path/to/pano2, 500, fade) ;
onTransitionEnd = mov1a; "

mov1a = "move commands for pano2"

neither
11-21-2007, 05:37 AM
Hi,zleifr,cheathamlane:

thank you very much!! You have helped me very big busy !

Best regards !!

neither
11-22-2007, 09:36 AM
Hi,zleifr,cheathamlane:

for example,i write like this code:

<spot id="my_autopresentation" static="1" salign="BC" staticX="260" staticY="-50" url="images tton_autopresentation.png" blockMouse="1"
onOver="" onOut=""

onStart="external.autorotator.disabled=1" onOver="scale=1.1,600,elastic;depth+=20" onOut="scale=1,300;depth-=20"

onClick="goTimer();"

goTimer="timer+=1,100,,move1;my_autopresentation.onClick=st opTimer;"

stopTimer="timer=0;pano.qualityStatic=high;move1=;move2=;move 3=;move4=;move5=;move6=;move7=;move8=;move9=;move9 =;move11=;move12="

move1="pano.pan=-15,900;pano.tilt=0,900;pano.zoom=.66,900,,my_autop resentation.dwell1; pano.qualityStatic=low"
dwell1="timer+=1,0,,my_autopresentation.move2; pano.qualityStatic=high"

move2="pano.pan=-200,900;pano.tilt=0,900;pano.zoom=.66,900,,my_auto presentation.dwell2; pano.qualityStatic=low"
dwell2="timer+=1,0,,my_autopresentation.move3; pano.qualityStatic=high"

move3="pano.pan=-200,900;pano.tilt=-30,900;pano.zoom=.66,900,,my_autopresentation.dwel l3; pano.qualityStatic=low"
dwell3="timer+=1,0,,my_autopresentation.move4; pano.qualityStatic=high"

move4="pano.pan=-210,900;pano.tilt=-30,900;pano.zoom=2.1,900,,my_autopresentation.dwel l4; pano.qualityStatic=low"
dwell4="timer+=1,0,,my_autopresentation.move5; pano.qualityStatic=high"

move5="pano.pan=-210,900;pano.tilt=0,900;pano.zoom=.66,900,,my_auto presentation.dwell5; pano.qualityStatic=low"
dwell5="timer+=1,0,,my_autopresentation.move6; pano.qualityStatic=high"

move6="pano.pan=-260,900;pano.tilt=0,900;pano.zoom=.66,900,,my_auto presentation.dwell6; pano.qualityStatic=low"
dwell6="timer+=1,0,,my_autopresentation.move7; pano.qualityStatic=high"

move7="pano.pan=-315,900;pano.tilt=0,900;pano.zoom=.66,900,,my_auto presentation.dwell7; pano.qualityStatic=low"
dwell7="timer+=1,0,,my_autopresentation.move8; pano.qualityStatic=high"

move8="pano.pan=-345,900;pano.tilt=0,900;pano.zoom=2.1,900,,my_auto presentation.dwell8; pano.qualityStatic=low"
dwell8="timer+=1,0,,my_autopresentation.move9; pano.qualityStatic=high;loadPano(?panoName=images/room,600);onTransitionEnd = ;"

move9="pano.pan=-35,900;pano.tilt=-0,900;pano.zoom=.66,900,,my_autopresentation.dwell 9; pano.qualityStatic=low"
dwell9="timer+=1,0,,my_autopresentation.move10; pano.qualityStatic=high"

move10="pano.pan=-145,900;pano.tilt=-0,900;pano.zoom=.66,900,,my_autopresentation.dwell 10; pano.qualityStatic=low"
dwell10="timer+=1,0,,my_autopresentation.move11; pano.qualityStatic=high"

move11="pano.pan=-165,900;pano.tilt=-0,900;pano.zoom=1.1,900,,my_autopresentation.dwell 11; pano.qualityStatic=low"
dwell11="timer+=1,0,,my_autopresentation.move12; pano.qualityStatic=high;loadPano(?panoName=images/office,600);onTransitionEnd = ;"

move12="pano.pan=-15,900;pano.tilt=0,900;pano.zoom=.66,900,,my_autop resentation.dwell12; pano.qualityStatic=low"
dwell12="timer+=1,0,,my_autopresentation.move1; pano.qualityStatic=high"


/>

i'm sorry,two bugs here.

1:
i have two panoramas,"office" and "room" with different move commands ,open the "office" then i mouse click the hotspot go in to the "room",,,then,i click autopresentation button,,,but,the "room" will move like "office",not his own commands.

2:i click autopresentation button----and the pano is moving----i click the pano(not autopresentation button) ----the pano is stop moving----then click the autopresentation button to start ---- the pano can't autopresentation


my pano is :http://vr.o.cn/flash_pano/
please help me ,thanks,i have a bad english,hope you can understand me .

best regards!!

zleifr
11-22-2007, 01:08 PM
neither: I do not see the room autopresentation commands in the xml, and I don't see the you are loading a new xml file, so you need to put the room commands in the xml too. AND wherever there is a loadPano(?panoName=room...) command put next to it goTimer="timer+=1,100,,move1a;my_autopresentation.onClick=s topTimer;"
note mov1a is the first movement of the autopresentation for room

And wherever IN ROOM there is a loadPano(?panoName=office...) put goTimer="timer+=1,100,,move1;my_autopresentation.onClick=st opTimer;"