A third sample demonstrates how to create a dynamic menu with XML data. The sample calls
the ActionScript
XmlMenu()
menu file and a reference to the current timeline. The rest of the functionality resides in a
custom class file, XmlMenu.as.
You can find the sample source file, xmlmenu.fla, in the Samples folder on your hard disk.
On Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\XML_Menu.
On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/XML_Menu.
Using the XML class
The methods of the ActionScript XML class (for example,
and
insertBefore()
and interpret downloaded XML data.
The following XML class methods send and load XML data to a server by using the HTTP
method:
POST
The
method downloads XML from a URL and places it in an ActionScript
load()
XML object.
The
method encodes the XML object into an XML document and sends it to a
send()
specified URL using the
returned data.
The
sendAndLoad()
is placed in an ActionScript XML object.
For example, you could create a brokerage system that stores all its information (user names,
passwords, session IDs, portfolio holdings, and transaction information) in a database.
654
Working with External Data
constructor and passes it two parameters: the path to the XML
) let you structure XML data in Flash to send to a server and manipulate
method. If specified, a browser window displays
POST
method sends an XML object to a URL. Any returned information
,
appendChild()
removeNode()
,
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?