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

Understanding the XML files

From: Flash Professional CS5 New Features

Video: Understanding the XML files

In Flash CS5, FLA files are now XML-based. The way that it works is that an FLA file is actually an archive of all of your assets, stored in an XML-based format. In this movie, we'll take a look at how that works. On the stage here, I have a button. Note that it has no instance name - we are actually going to edit that outside of Flash - and that's it in the middle of the stage and outside of Flash, we will move it to the left edge of the stage. The uncompressed file format for Flash is called XFL.

Understanding the XML files

In Flash CS5, FLA files are now XML-based. The way that it works is that an FLA file is actually an archive of all of your assets, stored in an XML-based format. In this movie, we'll take a look at how that works. On the stage here, I have a button. Note that it has no instance name - we are actually going to edit that outside of Flash - and that's it in the middle of the stage and outside of Flash, we will move it to the left edge of the stage. The uncompressed file format for Flash is called XFL.

So, in order to get the uncompressed version of your FLA file, you'll need to save it as XFL. So, go to File > Save As, and we'll save this as uncompressed.xfl. So, when you do Save As, change the format to Flash CS5 Uncompressed Document (*.xfl). So I'll click Save As, and we save the file, and notice the file name has changed to uncompressed.xfl. I'm actually going to close this file, and then we'll edit it outside of Flash, and then open it back up in Flash to see the changes.

So we'll go over to Finder. Notice that Flash created a folder called uncompressed. That's the same name as my FLA. This is the un-archived version of that file. So notice, inside of there, there is a bunch of XML files and other text files. And you can feel free to go through them, if you'd like. The main document that you're going to open in with Flash is the XFL file, so just remember that. And the document that holds all of your XML data for your application is in DOMDocument.xml.

So let's open that file using a text editor. Again, you're going to want to use a plain text editor, and by that, I mean you don't want to use Microsoft Word and add formatting to this. Make sure that you can save it as a plain text file. So, I'm going to TextEdit, and I'll open the file, and here you can see a whole bunch of XML data. Now, this may look like a bunch of gibberish to you, but if you scroll down, you can find a section of the code that says DOMTimeline name= "Scene 1".

This represents Scene 1 of your application. In there, you'll see layers, which, of course, represents the layers, and inside of the layers object, there is one called DomLayer, and you can see the layer name in there. So, of course, if you wanted to change that, you could. And then you'll see Frames, and this has your frame data. So you can find your Frame index number, which represents the frame number, and it starts at 0 instead of 1. So we'll just have to offset that by 1. So it'll be 1 less than how it's represented in Flash. So the 0 represents the first frame. 1 would represent the second frame.

Then you'll see DOMSymbolInstance, if you're working in the same file as me. Notice that the libraryItemName is Btn. That's the library name for this object that's on the stage, and the name field is blank. That's the instance name. So, if you add something here, then that will be reflected when you open up the XFL file. So, let's just make that change real quick. Type 'cactus_btn' and then we'll adjust its X position in the Matrix section. This is where the positioning of the object is controlled. So here, I'm going to change Matrix tx, that represents the X position, to 0.

So, I change it from 77.4 to 0, and I'll save the file - don't forget to do that - and jump back over to Flash, and open up uncompressed.xfl. The button is at the left edge of the stage - remember it was at the center before - and if it is selected, you can see, in the Properties panel, that its Instance name is set to cactus_btn. The main advantage to the XFL file format is that these files can be edited outside of Flash. That means people who don't have Flash can edit your Flash files and in theory, these files can be created with an application other than Flash, and then you can just open that up in Flash and continue working on the same project that you got from someone who didn't even have Flash.

So the XFL file format increases the potential for effective workflow, when you're working in Flash.

Show transcript

This video is part of

Image for Flash Professional CS5 New Features
Flash Professional CS5 New Features

27 video lessons · 11815 viewers

Todd Perkins
Author

 

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 Flash Professional CS5 New Features.

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.