all groups > flash actionscript > january 2005 >
You're in the

flash actionscript

group:

Dynamically Generated Data Via XML


Dynamically Generated Data Via XML tbufano
1/5/2005 9:04:44 PM
flash actionscript:
I'm a front end designer trying to get more involved in ActionScript
dynamically driven sites. This might be a very simple solution, but I'm having
a hard time finding a tuturial that will help me. Follows are the pages I'd
like to update: http://www.spencerstuart.com/about/offices/philadelphia/ The
drawback with the setup I have now is that if an office is removed or added,
I've got a lot of files I need to update (the main graphic as well as all the
individual office pages that have an office that shows up on that page). So,
for example, if I had to delete the Philadelphia office, I'd have to update the
graphic for the Chicago page (removing the Philadephia point), the Los Angeles
page, etc. What I would like to do is the following: 1. Have an XML file that
contains the office names list. The menu on the main page will dynamically
update itself when this XML file changes. 2. Each of the office names has an
associated point that would be plotted dynamically using an X and Y coordinate.
Each office page would also be a flash file with a reference to this
coordinate. That way, if an office were added, it would dynamically show up on
ALL of the pages without having to modify each page. This is a simple concept.
I'm worried that execution won't be so simple. Our development team is amazing
and can easily set any database and/or XML file I would need. They are just not
familiar with Flash (which is why I'm trying to figure this out). Can anyone
out there help me connect my ideas with some similar working code?
Re: Dynamically Generated Data Via XML abeall
1/5/2005 10:27:06 PM
Fist of, slick site. Second, this is very doable. If I was doing it, I would
make the XML look like this <xml> <cont name='North America'> <country
name='Canada'> <office city='Montreal' x='285' y='234' /> <office
city='Toronto' x='564' y='434' /> </country> </cont> </xml> ect. Then from
there you can fairly easily work it into the visuals. Just make a function
that, after the data loads, displays everything. You can use attachMovie to
place dots and buttons, then defined its properties based upon the loaded XML.
Just check out the XML (object) in the F1 reference. HTH
AddThis Social Bookmark Button