• 0

XML and Flash


Question

Hey guys,

I'm interested in using Flash MX and XML to make a sort of News script. Basically the XML is used for calling functions in flash like drawing a table, <TABLE> , and then updating content. I've seen it done in menu bars (it comes with the Flash tutorials (menu_tabs.fla in your installation directory). Are there any tutorials out there for this sort of thing specifically, which go into depth?

Link to comment
https://www.neowin.net/forum/topic/121084-xml-and-flash/
Share on other sites

1 answer to this question

Recommended Posts

  • 0

try the tutorials at: actionscript.org :)

what you basically want to do is:

1. load xml into flash - use XML.sendAndLoad(), XML.load() or LoadVars.sendAndLoad() or LoadVars.load()

to load the xml into flash. if you use loadvars, don't forget to XML.parseXML() the loaded xml. (you might have to do this anyway, i don't know if the XML object parses the data loaded by default)

2. now that you have your xml loaded, walk through the tree (using XML.childNodes collection and XML.firstChild). see the tutorials...

3. parse your XML data into an easy to use datatype like an array, then iterate that with some function to create movieclips or whatever you want to do with that data.

-- note. there are new 'data connectors' in flash mx 2004 pro, provided by macromedia. These are good, but are fairly heavyweight (to cover all possible uses/requirements) so i've continued using my own custom data loader. you might have some success gettings these to work rather than writing one yourself, if you're not that fluent in actionscript/flash, and you can deal with the 20-50K added to your .swf.

Link to comment
https://www.neowin.net/forum/topic/121084-xml-and-flash/#findComment-1441120
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.