Loading and Saving External XML Data in AIR (Apollo)
July 3rd, 2007
4 comments
I just finished an AIR (Apollo) application that loads and saves data from an external XML file. I figured I would share the code to accomplish this task as there is not a lot of Apollo info around at this time.
First off lets start with loading an XML file and reading its contents. I realize that there are much easier ways to load XML into Flash than this, but the advantage here is that I can use File.applicationResourceDirectory which allows me to target the installation directory for the XML file that was included with the AIR package. In this snippet I am using the synchronous open method. This essentially pauses everything else in the Flash movie until it has completed its task (opening the file).
Categories: AIR (Apollo) Tutorial, ActionScript 3.0 Tutorial AIR, Apollo, code, Flash, Learning, XML