Loading external XML data into Flash was a common pattern for building dynamic content like menus, galleries, or config-driven layouts. The ActionScript 2 XML class handles parsing automatically once the file is loaded, so you just need to set up the object, attach a callback, and point it at your file.

This approach keeps your content separate from the SWF, which means you can update text or data without recompiling the whole Flash file. If you’re dealing with larger XML files, watch out for load times — there’s no built-in progress event in AS2, so you might want to add a loading indicator.

Create an xml object:

var myXmlObject = new XML();

Perform action when xml file has been loaded:

myXmlObject.onLoad = function(success) {
  if (success) trace("XML File has been read.");
}

Load the xml file into the object:

myXmlObject.load("myXmlFile.xml");