-
Links to display map w/ state colors from xml
Hi,
I'll bet this is going to be a lot easier for some of you than it has been for me.
I have a map of the United States.
Each state is currently gray.
Each state is a symbol, and I can color them individually...but I don't want to.
I have a list of simple links that come from an xml file.
<record>
<state>Montana</state>
<category>Northern</category>
<question>National Park</question>
<response>Yes</response>
</record>
The list of links comes from <question>.
There are about forty of these.
All responses are either yes or no.
If the National Park link is clicked, I want the map to display with all states whose response to this question is yes to be colored blue.
I've tried several searches, but I haven't found anything that seems to apply. This could be because I'm not even sure how to begin.
Thanks for any help at all,
Debbie
-
Senior Member
I dont even fully understand what it is your asking??
the links come from <question>?
do you mean there is a bunch of HTML mark up in question node in the xml file?
there are 40 what? links? are these 'links' questions?
what do you mean LINKS that come from the XML file? do you just mean data?/nodes/elements?)
your not even giving anything to help you with?!!
to do this.. you would:
1.) need a list/source (array) of all the clips (states) on the stage..
2.) within this array or within the clips themselves there needs to be some data to check against (example: var nationalpark = true
so you can loop through the list/clips and check that value..if yes.. dynamically color these states..
3.) to color somethign in Flash you need to make that portion a movieClip..and use/apply a color Object to it..
-
So sorry, I have a script that parses my xml file and creates a list of the questions using createTextField.
This list is just text. I need each item in this list to be a clickable link.
I need each of these links to change my map display.
If the National Park link is clicked, the map shows each state with a park in blue.
Then clicking, for instance, an Ocean link would change the map so that all ocean front states appear blue.
Does that help,
Thanks again,
Debbie
-
Senior Member
depending on how the rest of your project is set up.. you may need adjust/re-work that as well.. on top off adding your new functionality.
it will take a bit of time is all I bet..(depending on how good you are at AS)
there are several steps involved.
the first being you'll need to convert that text into HTML links in you XML
(you'll also want to wrap this in CDATA tags)
there are of course more/other steps involved.. but I would just start there for now.
are you looking for help on doing this yourself?.. or for someone to do it for you?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|