Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Introduction to XML data

From: ActionScript 3.0 in Flash CS3 Professional Beyond the Basics

Video: Introduction to XML data

In this chapter, we are going to talk about working with XML data in Flash. Before we talk about working with XML in Flash, we will talk about what XML is. If you're following along, you can open up the images.xml file and that's inside of the data folder in the Chapter_03 folder in the Exercise Files folder. And you can just open up this file in any text editor. Let's talk about how this file is organized and how XML works. XML stands for Extensible Markup Language. You can kind of think of it like HTML, except instead of the tags being table and other things like that, you can make up your own names for tags and make them meaningful.

Introduction to XML data

In this chapter, we are going to talk about working with XML data in Flash. Before we talk about working with XML in Flash, we will talk about what XML is. If you're following along, you can open up the images.xml file and that's inside of the data folder in the Chapter_03 folder in the Exercise Files folder. And you can just open up this file in any text editor. Let's talk about how this file is organized and how XML works. XML stands for Extensible Markup Language. You can kind of think of it like HTML, except instead of the tags being table and other things like that, you can make up your own names for tags and make them meaningful.

In this file, I have an opening tag. Tags have brackets around them or less than and greater than signs. I have an opening tag called images and a closing tag called images. Notice the closing tag looks just like the opening tag, except for it has a forward slash, right before the word images. And that's how opening and closing tags work in XML and also in HTML. Inside of the images tag, we have a bunch of single image tags and these represent the location of images and thumbnails in the Chapter 3 folder.

The opening tag for each image contains the source or the large image. This is called an attribute, and that's where inside of an opening tag there is some name that means something, an equal sign, and an then a value inside of quotes. So, we have the source at images/Image1. jpg and the thumb is referring to the path of the thumbnail. Inside of the tag, we have a value, and that's just the description of the image.

I kept it pretty generic, so it's pretty easy to read and understand. But when using XML yourself, the names of the tags don't have to be images. They can be any name you want, and that's why it's extensible, because it's dynamic depending on what you choose to name them. So, you have tags that have meaning. I could easily open this file and tell that this file contains a bunch of images. Because that's the name of the first tag. Now that we have a basic idea of how XML works, let's talk about how to work with XML in Flash.

Show transcript

This video is part of

Expand all | Collapse all
  1. 7m 53s
    1. Welcome
      2m 24s
    2. How to use the exercise files
      1m 11s
    3. Reviewing ActionScript 3.0 basics
      4m 18s
  2. 35m 12s
    1. Understanding the Display List
      1m 59s
    2. Using Display Objects other than MovieClip
      3m 19s
    3. Using the addChild method
      2m 27s
    4. Using the removeChild method
      1m 25s
    5. Referencing a Display Object by index number
      4m 53s
    6. Referencing a Display Object by name
      4m 1s
    7. Controlling Display Objects in different timelines
      3m 23s
    8. Controlling Display Objects in different movies
      3m 43s
    9. Using addChild to change parents
      4m 20s
    10. Understanding Stage vs. stage
      5m 42s
  3. 30m 3s
    1. Why use ActionScript to animate?
      1m 25s
    2. Understanding the Tween class
      4m 3s
    3. Using different easing methods
      4m 5s
    4. Understanding Tween Class methods
      3m 44s
    5. Responding to tween events
      2m 33s
    6. Using tweens to move a dynamic map
      6m 1s
    7. Making the map respond to tween events
      8m 12s
  4. 31m 2s
    1. Introduction to XML data
      2m 17s
    2. Understanding E4X syntax
      2m 5s
    3. Creating raw XML data
      4m 9s
    4. Loading external XML data
      2m 32s
    5. Using the XMLList class
      4m 6s
    6. Using XML data to load external images
      3m 21s
    7. Using XML data to create an image gallery
      5m 6s
    8. Displaying text from an XML file in your gallery
      5m 5s
    9. Adding tweens to your gallery
      2m 21s
  5. 39m 18s
    1. Reviewing packages and classes
      1m 7s
    2. Creating a template for class files
      3m 38s
    3. Defining a reusable class path
      1m 29s
    4. Creating a DisablingButton class from a template
      5m 34s
    5. Connecting classes to movie clips
      3m 15s
    6. Communicating between classes
      10m 20s
    7. Creating a ScaleButton class
      8m 29s
    8. Reusing a ScaleButton class
      5m 26s
  6. 26m 10s
    1. Preparing to build an advanced image gallery
      4m 13s
    2. Dividing the thumbnail into segments
      2m 2s
    3. Adding interactivity to thumbnails
      4m 36s
    4. Loading full-sized pictures
      3m 58s
    5. Creating an Image Gallery class
      11m 21s
  7. 29m 9s
    1. Understanding particle systems
      58s
    2. Creating particles
      2m 51s
    3. Animating particles
      1m 20s
    4. Randomizing particles
      3m 42s
    5. Setting a particle range
      3m 22s
    6. Defining a dynamic range
      1m 54s
    7. Controlling particle alpha and scale
      2m 23s
    8. Varying particle speed
      6m 55s
    9. Removing children to optimize performance
      2m 51s
    10. Using different particles
      2m 53s
  8. 22m 34s
    1. Understanding transitions
      1m 41s
    2. Understanding the Object class
      2m 58s
    3. Placing transition information in an object
      2m 21s
    4. Creating transition animations
      2m 13s
    5. Creating different types of transitions
      3m 28s
    6. Using undocumented transition events
      4m 4s
    7. Using transitions in an image gallery
      5m 49s
  9. 26m 11s
    1. Reviewing Flash video basics
      2m 32s
    2. Creating a resizable interface
      3m 53s
    3. Understanding cue points
      1m 58s
    4. Using XML for closed captioning
      2m 34s
    5. Connecting closed captioning to cue points
      3m 55s
    6. Creating an advanced navigation interface
      3m 4s
    7. Creating an AdvancedVideo class
      8m 15s
  10. 24s
    1. Closing remarks
      24s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

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.


Mark all as unwatched Cancel

Congratulations

You have completed ActionScript 3.0 in Flash CS3 Professional Beyond the Basics.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.