?
Solved

select multiple areas on map and send comma seperated string to Javascript function

Posted on 2003-03-11
17
Medium Priority
?
208 Views
Last Modified: 2010-04-03
I need to create a regional map split into unique districts. Users can select multiple regions or deselect any region. When the user is finished selecting regions, a button will send a comma-seperated string to a Javascript function (or alternative - but not using VBScript) within the HTML page that holds the Flash movie.

I can only so far find examples that use VBScript. Ideally the script used will be purely javascript, but if this isn't possible, any other alternatives are welcome.
0
Comment
Question by:aaran
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 5
  • 2
17 Comments
 
LVL 6

Expert Comment

by:henryww
ID: 8110705
hi aaran,

so ur regional map is in flash?
and u want to pass a comma-separated string of what the user selected to a javascript?

is that what u want??

cheers
0
 

Author Comment

by:aaran
ID: 8110752
Almost. Each region will carry a unique string (that I have to hard code into the Flash). When the user clicks on a region, that region will need to change colour (to show it's selected) and also append it's own unique string to a variable.

Users can select multiple areas (and they can deselect an area by clicking it again), which I why I need it to be a comma-seperated value...!
0
 
LVL 6

Expert Comment

by:henryww
ID: 8110818
that's not too hard.

u have the fla or any particular codes u need help?

or u just need an example?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 6

Expert Comment

by:henryww
ID: 8110829
are u doing it in mx or 5?
0
 
LVL 6

Expert Comment

by:henryww
ID: 8110855
i am going to have dinner now, will give u an example when i come back

cu
0
 

Author Comment

by:aaran
ID: 8110858
It's in MX...I haven't actually got a copy of the map at the mo, so just a basic example using 3 squares, each with a unique value (e.g. area1 area2 area3) will do...plus the javascript to collect the string.
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8111382
can you use PHP?  I am not sure why you can't use VB, but I can do it in PHP...  


let me know...


rp
0
 

Author Comment

by:aaran
ID: 8111409
It's a last resort really...we use CGIs built in Delphi...and my boss doesn't really want to install PHP on the webserver unless we really have to!
0
 
LVL 6

Accepted Solution

by:
henryww earned 1000 total points
ID: 8111507
http://www.smartclever.net/example/flash/region/


see if that's what u want ...

cheers
0
 

Author Comment

by:aaran
ID: 8111557
Looks like it could be exactly what i want...can you change it from the three alerts to a single alert that shows a list of the regions selected (just so I can check it's gonna b suitable)?

Thanks, u're a genius.
0
 
LVL 6

Expert Comment

by:henryww
ID: 8111625
no problemo ...

please check now ...
0
 
LVL 6

Expert Comment

by:henryww
ID: 8111707
oh ... can do without any extra ...

just flash & javascript ....

!!??
0
 
LVL 6

Expert Comment

by:henryww
ID: 8111901
forgot to give u the source file
http://www.smartclever.net/example/flash/region/index.html
(view source for the html code)
http://www.smartclever.net/example/flash/region/selregion.fla

create all ur map regions with a 2 frame movieclip, different colors, stop() at each frame, make sure the instance names on the stage is the region name u want, this way u don't have to use extra variables ...

a function is there to check the name of the mc clicked and push it in a array ...

not very complicated.

cheers
0
 

Author Comment

by:aaran
ID: 8111934
Can you please send me a link to the FLA for this..?
0
 
LVL 6

Expert Comment

by:henryww
ID: 8112025
hmmm ... see the last comment pls ...

thanks & cheers
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8112413
I am gone for a meeting, and Henry solves another one :)

Congrats Henry, you made the top 5!


truly a master of the art :)

rp

0
 
LVL 6

Expert Comment

by:henryww
ID: 8112586
thank you rp ...
u are not far behind anyway ... who knows, a few days later ... u will be ahead of me AGAIN ...

well .. i am trying very hard not to answer any questions ... but ... i just keep coming back to EE and check for new questions ... LOL.... this is so addictive ... !!!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses
Course of the Month10 days, 23 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question