-
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..
-
Senior Member
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; }
-
anyone else hear that?
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.
-
Senior Member
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...
-
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!
-
anyone else hear that?
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.
-
Oh I know, without whispers help I would be screwed!
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|