Forums  

Go Back   Forums > Talk > General FPP Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 10-16-2007, 03:24 AM
Dalileis Dalileis is offline
Member
 
Join Date: Sep 2007
Location: Sweden & Croatia
Posts: 71
Downloads: 0
Uploads: 0
Default AS3: passing loadPano parameters through Flash CS3 combobox

To pass individual parameters for every pano through combobox works the same way as passing parameters through spot objects loadPano, right?

Well...

I've noticed when I pass parameters for zoom, tilt, pan and segments, through combobox, then the text in the combobox stops updating, so when you go to next pano through some hotspot in your present pano, the previous pano name doesn't update to next pano name when the next pano loads.

It's either: keep the control over params, but forget about having the correct pano name displayed in the combobox, automatically updating, when going through hotspots existing side to side with combobox.

OR

have the name correctly updated upon every new pano, but then say goodbye to having zoom, tilt, pano,segments values set the way you want to at the beginning, stick with just the name of the pano.

Can't all the possible loadPano parameters be passed through combobox without breaking the pano name updating functionality?

This is what I'm doing:

http://img155.imageshack.us/img155/6...trollerog2.jpg

and obviously, this is not loft as it says in the combobox, the name didn't update when hotspot arrow in pano05 was clicked because this pano (pano04) had extra parameters passed to it via the combobox:

http://img134.imageshack.us/img134/460/notloftfk9.jpg

Any pointers much appreciated.

Thank you.

Last edited by Dalileis; 10-16-2007 at 03:38 AM.
Reply With Quote
  #2  
Old 10-16-2007, 07:46 AM
zleifr's Avatar
zleifr zleifr is offline
Senior Member
 
Join Date: May 2007
Posts: 609
Downloads: 0
Uploads: 0
Default

You're going to need to edit the .fla just a bit. There are at least 3 versions of the controller that I have seen, the below should work for the as3 version Denis posted to the forum, might work for the as2 version, and I don't even remember where I saw the other one.

find this line:
if (_cb.getItemAt(i).data==panoName) {

replace it with:
var dataFromArray:String = _cb.getItemAt(i).data ;
var nameOnly:Array = dataFromArray.split("&")
if (nameOnly[0]==panoName) {

Basically, controller gets the panoName from the main application, which in your case would be images/pano04 and it is trying to match it to one of the items in the data array, but images/pano04 in the data array has all the parameters after it, so images/pano04 doesn't match images/pano04&panHome=......., hence the controller doesn't update. So, the above code splits the params from the item in the data array before it checks for a match.
Reply With Quote
  #3  
Old 10-16-2007, 02:01 PM
Dalileis Dalileis is offline
Member
 
Join Date: Sep 2007
Location: Sweden & Croatia
Posts: 71
Downloads: 0
Uploads: 0
Thumbs up

Thanks!

I've found the line and replaced it and it's working beautifully now. Zoom, tilt, pan, segments, all of it, and the comobobox updating as it should.

As for the controller, I'm using the controller from the standard Flash Panoramas package. Resaved it in Flash CS3, and answered yes when it asked me do I want to convert from Flash 8 format.

Cheers!


Quote:
Originally Posted by zleifr View Post
You're going to need to edit the .fla just a bit. There are at least 3 versions of the controller that I have seen, the below should work for the as3 version Denis posted to the forum, might work for the as2 version, and I don't even remember where I saw the other one.

find this line:
if (_cb.getItemAt(i).data==panoName) {

replace it with:
var dataFromArray:String = _cb.getItemAt(i).data ;
var nameOnly:Array = dataFromArray.split("&")
if (nameOnly[0]==panoName) {

Basically, controller gets the panoName from the main application, which in your case would be images/pano04 and it is trying to match it to one of the items in the data array, but images/pano04 in the data array has all the parameters after it, so images/pano04 doesn't match images/pano04&panHome=......., hence the controller doesn't update. So, the above code splits the params from the item in the data array before it checks for a match.
Reply With Quote
  #4  
Old 11-30-2007, 04:19 PM
DaveGibson DaveGibson is offline
Member
 
Join Date: Nov 2007
Location: Canada and Dominican Rep.
Posts: 33
Downloads: 0
Uploads: 0
Thumbs up

Thanks! This worked perfectly for me (on my second attempt)- I must have included an extra space in my first 'copy-paste' as it gave me an 'syntax' error.
Reply With Quote
  #5  
Old 12-08-2007, 12:35 AM
DaveGibson DaveGibson is offline
Member
 
Join Date: Nov 2007
Location: Canada and Dominican Rep.
Posts: 33
Downloads: 0
Uploads: 0
Default

There seems to be a problem with this however. It did fix the menu update problem perfectly, but now my dropdown menu seems erratic after the first menu click. It loses mouse sensitivity, the color change on mouse-over only lasts about 1 second and frequently the mouse click will not work.
I removed the code and went back to the original code and this erratic behavior went away. However I again lost the menu updates.
I seem to have an AS2 controller. When I tried to export the movie as AS3, it gave me error messages.
Maybe I need as AS3 controller? Any idea of where I could get it?

I started another thread about this before I realized it was related to this code change.
Reply With Quote
  #6  
Old 12-08-2007, 12:47 AM
jez_p jez_p is offline
Member
 
Join Date: Aug 2007
Posts: 46
Downloads: 0
Uploads: 0
Default

Hi Dave.

You can get the AS3 controller here:

http://flashpanoramas.com/player/sou...roller_as3.zip
Reply With Quote
  #7  
Old 12-08-2007, 12:53 AM
DaveGibson DaveGibson is offline
Member
 
Join Date: Nov 2007
Location: Canada and Dominican Rep.
Posts: 33
Downloads: 0
Uploads: 0
Default

Hi jez_p
I cannot seem to get this link to work. Could you chek it? Thanks
Reply With Quote
  #8  
Old 12-08-2007, 01:03 AM
jez_p jez_p is offline
Member
 
Join Date: Aug 2007
Posts: 46
Downloads: 0
Uploads: 0
Default

Apologies, here you go:

http://flashpanoramas.com/player/sou...roller_as3.zip
Reply With Quote
  #9  
Old 12-08-2007, 01:07 AM
DaveGibson DaveGibson is offline
Member
 
Join Date: Nov 2007
Location: Canada and Dominican Rep.
Posts: 33
Downloads: 0
Uploads: 0
Default

thanks. Got it.
now to test it..
Reply With Quote
  #10  
Old 12-08-2007, 02:29 AM
DaveGibson DaveGibson is offline
Member
 
Join Date: Nov 2007
Location: Canada and Dominican Rep.
Posts: 33
Downloads: 0
Uploads: 0
Default

Great! Switching to the as3 controller seems to cure the flakiness in the menu after making the above code change.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 11:28 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.