Join Todd Perkins for an in-depth discussion in this video Using XML data, part of Flash CS4 Professional: Object-Oriented Programming .
- View Offline
- Exercise Files
Now we will look at using external XML data that contains repeating elements.…On the stage I have a text field called my_txt. I'll put some text in that field. …Let's go to the first keyframe of the Actions layer and open up the Actions panel.…This code is loading an external XML file called data.xml. Once the file is loaded, …it's held in an XML instance called gallery. I'm going to erase the…next line of code. That's line 8 in my code and then I'm going to use …a trace statement to trace the value of gallery.image. Image is the repeating element…inside of the gallery.…
So I'm going to type trace and in parentheses, gallery.image. Gallery…represents the root element and image represents the repeating element. So we…have three images inside of the gallery. Let's see what we get in the Output window. …Test the movie and you will see that you get every image element. …So we have all three of them.…So we need a way to access individual elements. Repeating XML elements are what's…called an XML list. Think of an XML list as an array of XML elements.…
- Loading external text, images, and XML files
- Creating essential properties for a View class
- Defining a Model class
- Building and implementing interfaces and designs
- Debugging projects
- Building applications with Controller-class buttons
Skill Level Intermediate
1. ActionScript 3.0 Essentials
2. Advanced ActionScript Techniques
3. Object-Oriented Programming Fundamentals
4. The Model View Controller Design Pattern
5. Building a Model Class
6. Building a View Class
7. Building a Controller Class
8. Improving and Debugging the Application
9. Moving Forward
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.