Join Todd Perkins for an in-depth discussion in this video Replacing and deleting elements and attributes, part of ActionScript 3.0: Working with XML.
Now we will talk about replacing and deleting elements. If you are following along, I am working in 04_Deleting_Elements.fla in the Chapter 2 folder in the exercise files folder. Or you can also work along with the same file I have been working with throughout this chapter. Let's go to the first keyframe in the Actions Layer and open up the Actions Panel and right above our trace statement, I am going to type a new value for image.photographer. So image.photographer, I will set that equal to a different name and you can type in anything you want here for the name. I am just going to type a different name.
So test the movie, and then we see that our photographer now has "A different name" as its name instead of Photographer 1. So that's a look at how to replace elements. Let's say we want to delete image.photographer altogether. So a few lines below image.photographer, I am going to delete that element by typing the Delete keyword and then image.photographer. We test the movie. We will see that the photographer is not even there anymore.
So that is how to replace or delete elements using E4X syntax.
- Understanding XML data
- Creating XML in ActionScript 3.0
- Working with external XML data
- Building a reusable RSS reader class
- Using PHP with XML
- Working with blogs
- Working with Flickr images using the Flickr API
- Working with podcasts
Skill Level Intermediate
1. Understanding XML Data
2. Creating XML in ActionScript 3.0
3. Working with External XML Data
4. Building a Reusable RSS Reader Class
5. Using PHP with XML Data
6. Working with Blogs
7. Working with the Flickr API
8. Working with Podcasts
- 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.