A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 28 of 28

Thread: Interactive Map - Need xml assistance

  1. #21
    Junior Member
    Join Date
    Jun 2009
    Posts
    16
    Ok, I know I'm real close I've done steps 1 & 2 but I'm confused how I do #3. Do I add the text inside each county/button?


    1.) populate the XML file with all your counties (or whatever ones you need to add data to)
    2.) name all the movieClip/counties on the stage to match the names in the XML file
    3.) add a few lines of code that when you rollOver the movieClip/county (already there)..the data that is nested inside each clip gets display in a text field..or 3 separate textfields..(not already there)

    when you rollover the clips you will see the data trace out already..

  2. #22
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    no...that would be the textfield(s) that will display the rates whenever you rollover a county..

    form the image you linked to.. it looks like it is on the right side...

    then instead of this:

    PHP Code:
    _root[targetName].onRollOver = function(){
                    
    trace("NAME: "+this.countyName);
                    
    trace("RATE1: "+this.rate1);
                    
    trace("RATE2: "+this.rate2);
                    
    trace("RATE3: "+this.rate3);
                } 
    do this: (assuming you have 3 text fields on the stage named rate1_txt, rate2_txt, and rate3_txt)


    PHP Code:
    _root[targetName].onRollOver = function(){
        
    rate1_txt.text this.rate1;
        
    rate2_txt.text this.rate2;
        
    rate3_txt.text this.rate3;


  3. #23
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,930
    I'm looking forward to seeing your final project whispers

    Actually, wish I would have seen this thread earlier, I did something similar here:
    http://brianwpiper.com/ill/ill.htm

    All xml fed...I also proposed creating a little exe the client can run on their PC using SWFStudio which lets them change the info, then it writes the new xml and ftp's it up...I did that on another project and it worked great and kept them out of the xml...

    good luck ISU95! Looks like whispers has kept you on the right track!
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

  4. #24
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    I have done something similar with a US map of states.. all XML based..

    change color of each individual state..display (or not) the state abbreviation...also has a 'tool tip' where you can add data to if desired.. (population, sate flag, name, state bird..etc) whatever really..

    hopefully he'll get it all worked out...

  5. #25
    Junior Member
    Join Date
    Jun 2009
    Posts
    16
    Whispers has been a huge help, I can't thank him/her enough. He's pretty walked me through the whole project. Unfortunately I've only done a little action scripting and I've never done anything with xml. I don't have it working quite right yet but I think I'm close, it's due to the client tomorrow!

  6. #26
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,930
    That's why I'm such a FK fan...I've gotten LOTS of help and code here myself. Wasn't bashing u ISU, just poking a bit at the hatted cat...
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

  7. #27
    Junior Member
    Join Date
    Jun 2009
    Posts
    16
    Oh I know, without whispers help I would be screwed!

  8. #28
    Junior Member
    Join Date
    Jun 2009
    Posts
    16
    Whispers;

    Does the following code go in the actions layer?

    _root[targetName].onRollOver = function(){
    rate1_txt.text = this.rate1;
    rate2_txt.text = this.rate2;
    rate3_txt.text = this.rate3;
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center