PDA

View Full Version : Controller parameters


ccmas
06-03-2007, 04:29 PM
Hi...
I've been looking at controller.html in the examples folder for FPP_v2.0.1. I confess to being absolutely mystified as to where the parameters to the controller.swf are coming from. No files seem to contain the words "snow forest" or "green garden". I've looked at the controller files .fla .xml and .html. The html does contain "so.addVariable("xml_file","controller.xml");" but that's the only reference I can find. I just wanted to try this out with my own files.

Is this "Denis magic" (he does seem to be a bit of a magician) or can someone throw any light on it?

Many thanks.

PauloGGPX
06-03-2007, 10:45 PM
Hi ccmas,

although Denis is a magician ;) this one isn't a trick...

the controller.swf establishes a local connection with the main swf file, and when the combo box changes a function gets called:

loadPano(_cb.getSelectedItem().data);

(of course there's a lot more stuff going on but this is what makes it tick hehe)

So the magic is in the actionscript inside controller.fla

hope it helped :) if not ask again ;)

ccmas
06-04-2007, 12:05 AM
Hi PauloGGPX

It looks like the band of magicians is increasing!

Now, I don't know Flash, but I did look at the code ( I was a programmer originally). My question now is, where is the "data" coming from?

The first time it's called it has to be snow forest and the second time green garden. It you excute controller.html in the examples these words do come up.

It must be me ..or perhaps it still is magic??

Many thanks

Denis
06-04-2007, 01:36 PM
You can find this data inside controller.fla file (property of combobox).
It's not a magic, but you need Adobe Flash editor to edit it. :)

If you have no Flash editor, you can make similar combobox using html and Javascript. Look at ExternalInterface property in manual.

ccmas
06-05-2007, 07:54 AM
All is clear now - I hadn't noticed the combobox values.

Many thanks Denis

fotocubo
06-05-2007, 07:32 PM
Hi all,

I am building a multinode virtual tour using normal hotspots and controller.swf. No problem to link and display new scenes, but I'd like the combobox to update with the name of every new pano I enter after clicking on normal hotspots.

Any sugestion?

Thanks in advance for any help and to Denis for this fantastic viewer.


Opppps... :? just now I've noticed that controller combobox updates right. It is just a matter of keeping the same sequence order in both images and labels lists. All is working fine. Thanks!

fotocubo
07-01-2007, 02:35 PM
I am still having problems with controller.swf. I am working on a multinode tour. In the simple way there is no problem, I mean, setting simple rows of data anda labels. But I need to include a pano with borders limits and cannot find the solution. I wonder if itґs posible to add parameters to panos in Data list. I can set border limits for a pano using a specific xml and it works with normal hotspots, but Controller does not seem to read the xml, so does not apply the defined xml parameters for that pano. I tried to ad ?xml_file= pano.xml to pano value in Data list but no way. Also tried by creating a funtion to reset borders and added it to data in this way:

In main xml file:
__________________________________
noBor="
external.borders.pan_min=-360;
external.borders.pan_max=360;
external.borders.tilt_max=180;
external.borders.tilt_min=-180;

"

yesBor="

external.borders.pan_min=-20;
external.borders.pan_max=20;
external.borders.tilt_max=50;
external.borders.tilt_min=-50;

"

In ComboBox Data Values:
______________
images/pano1/pano1;yesBor()
images/pano2/pano2;noBor()


And it works if i click right on Controller box, it loads the panos, but does not updates current panos names if they were opened from normal hotspots. I hope I've explain myself, my english is terrible. :(

Any helping highly appreciated.

Thanks! :)

Denis
07-07-2007, 03:07 PM
Actually, Border plugin can update the data from XML file. Make different XML's for each panorama and place your settings to <borders>pan_min=20</borders>.

Use default XML name or load it directly: loadPano(?panoName=newPano&xml_file=newPano.xml);

This should work for spots and for controller.

The same for Autorotator.

fotocubo
07-07-2007, 07:39 PM
Sorry Denis, I've tried every method but I am not able to get the Controller.swf to be synchronized with hotspots in reading XML parameters. Of course it has to be my fault, so i'd better will wait to see a working sample using normal hotspots + controller + diferent border parameters in order to find out where I fail. :(

Thanks! :)