PDA

View Full Version : Easiest way to set pan/tilt/zoom when using Controller plug in?


Gary
07-23-2007, 07:51 PM
Greetings all,

As they say in the US, I'm not feeling like the "sharpest tool in the shed" these days...:(

I've been searching for a reliable way to set pan/tilt/zoom in an xml file (or using multiple files for each panorama) when using the controller plug in. I've tried both the AS2 and AS3 controllers without success. If I load the panoramas separately without the controller or try my settings using hotspots everything works correctly, but when using the controller, it's as though my pan/tilt/zoom settings are ignored and the panhome/tilthome settings of the intial tour are used for all subsequent tours. Can anyone share an xml snippet which shows how this can easily be done?

Many thanks...

<gary>

kevin
07-24-2007, 12:48 PM
Hi Gary,

I'm not sure if this is "easy" but this is how i did it.

In the controller FLA file look at the Actions - Frame of the Layer 2. At the bottom, line 91 I think, you will see the code "_lc.send(masterSlot, "execute",....

This is to load the pano. change this to leash=free to allow new pan and tilts. For example my line now reads:

_lc.send(masterSlot, "execute", "pano.leash=free;loadPano(?panoName=images/"+name+",600);"

I also added images/ before the code for "+name+" because I have my panos in an images folder.

Now you can go back to the Parameters of the Layer 1 (make sure the graphic is selected).

Under date you can now add the pan and tilt info as you would on a normal hotspot as based on the documentation. For example here is one of mine:

bedroom_cube&panHome=65&tiltHome=-21

I hope this help... it really buged me for a while until I figured it out :-)

Gary
07-24-2007, 04:56 PM
Hi Kevin,

Your solution works perfectly! Thanks so much for your help! It hadn't occurred to me to put the panHome/tiltHome parameters in the comobox data field following the name of the panorama inside the FLA.

For me, my next task is to populate the FLA using an XML file as the dataprovider, something that appears to be documented quite well as a standard FLA programming practice. This way, I can hopefully reach my final goal of having just have one copy of controller.FLA on my website and attaching an XML tree for each of our virtual tours (we shoot residential real estate)...

Kevin, thanks again for your quick and extremely helpful response!

<gary>