Posts

Showing posts from September, 2010

Load multiple images with actionscript 3

Image
In this tutorial we will learn how to load multiple images using actionscript 3 and xml. Let's see how we can do this! 1. Establish the project structure. Make the same folder hierarchy like in the image below: ro/sorin/utils/ contains the TextLoader class, we will use this class to load the xml file. If you want to fallow along you can download it TextLoader.as , place the file inside the utils folder. The other folders are self-explanatory. 2. Creating the xml file structure. The xml file looks like this: <?xml version="1.0" encoding="utf-8"?> <images> <image url="assets/images/img_01.jpg"/> <image url="assets/images/img_02.jpg"/> <image url="assets/images/img_03.jpg"/> <image url="assets/images/img_04.jpg"/> <image url="assets/images/img_05.jpg"/> </images> Every image tag contains the data for one image. The url is a attribute of the i...