amMap support forum

You are not logged in.

Announcement

FORUM CLOSED! This forum is closed. We moved to a new place at Zendesk. Update your bookmarks.

Flash amMap: Help


#1 2008-04-27 18:18:22

sailor
Member

Combobox to reload data

Hi,

Is there a way to have a Combobox in the map that will reload data?

I need to let the user select from a long list and depending on selection, load a new data.xml file

Something like:
a combobox with a list of views.
on selection, the map reloads data as if I was doing: url="!ammap/ammap_data_myView23.xml"



Thanks

Sailor

Offline

 

#2 2008-04-28 00:55:51

marcelionis
Administrator

Re: Combobox to reload data

It is ossible, but not with default ammap features. You should create your own swf file with combobox, and data file with movies with all urls you need,  for example:

<movie url="!ammap/ammap_data_myView23.xml" oid="movie1">

And then your compbobox, on change should call this function:

_root.clickObject("movie1");

Offline

 

#3 2008-04-28 16:47:56

sailor
Member

Re: Combobox to reload data

Thanks,

I can get it to work using buttons but not with the combobox component.
The combobox is highlighting on click but does not open...
It would be great if I can get it to work with the combobx component.

Any idea?

Thanks

Offline

 

#4 2008-04-28 17:33:51

sailor
Member

Re: Combobox to reload data

Hi,

I can only get it to work with one selection (button) not with more then one which is what I need.



I have created a fake combobox in flash with two buttons.
Put this code in each respectively:

_root.clickObject("view23");
_root.clickObject("view24");


Added to ammap_data_main.xml:

<movie x="0" y="200" file="icons/combo.swf"   title="title" balloon="false"></movie>   
<movie url="!ammap/ammap_data_view23.xml" oid="view23">
<movie url="!ammap/ammap_data_view24.xml" oid="view24">

Some more issues I get:

1.When adding the two "combo movies" all labels that follow disapear... I managed to fix that by moving all movies to after labels.
2. Only one selection works. The second breaks the application (things like some rectangles change to black etc...)
3. now if I click a country, I get the same bug as 2 (black rectangles)


HELP


   

So effectively, I still don't have a way to use a

Offline

 

#5 2008-04-28 17:41:36

sailor
Member

Re: Combobox to reload data

clicking the second option seems to reload the current data file and changes some of the rectangles to black

Offline

 

#6 2008-04-29 02:13:07

marcelionis
Administrator

Re: Combobox to reload data

Maybe you didn't close your movie node and your xml is corrupted? it should be:

<movie x="0" y="200" file="icons/combo.swf"   title="title" balloon="false"></movie>   
<movie url="!ammap/ammap_data_view23.xml" oid="view23"></movie>
<movie url="!ammap/ammap_data_view24.xml" oid="view24"></movie>

Offline

 

#7 2008-04-29 03:47:19

sailor
Member

Re: Combobox to reload data

I'll try tomorrow,

any thought about combobox component not opening?

Offline

 

#8 2008-04-29 12:05:29

marcelionis
Administrator

Re: Combobox to reload data

Check whether you published your swf file for flash player 8

Offline

 

#9 2008-05-11 17:22:18

sailor
Member

Re: Combobox to reload data

I did forget to close the movie node.
Yes, I do publish as flash 8, but we decided to go with our own MC combobox instead of the compponents, so all is good for now.
Thanks for your great help.

Offline

 

© amMap & amCharts | Forum engine: PunBB