In the case of the application??™s descriptor file, it is the project name followed
by -app.xml (see Figure 12-3).
239
FLEX AND AIR
Figure 12-3. Application descriptor file
Since this exercise uses a good deal of
ActionScript to create its functionality,
you can either open the file
MediaCenter-start.zip from the
code download for this book at
www.friendsofed.com, or you can
add the code manually as we go
along. MediaCenter-start.zip contains
the ActionScript but none of the
MXML. We will be looking at all of the
ActionScript as we move through the
exercise.
2. Import MediaCenter-start.
zip. Copy the file from the
website to your desktop. You
import an archived project by
selecting File ?¤ Import ?¤ Flex
Project (Figure 12-4). At this
point, click Browse to find the
archived file and then click
Finish.
Figure 12-4. Choose File ?¤ Import ?¤ Flex Project.
240
CHAPTER 12
Building the Media Center layout
The Media Center layout consists of an Image component, a Video Display component, and a
FileSystemTree component. The FileSystemTree component is specifically built for use with AIR. It allows
you to access the files on your computer using the same intuitive technique that most file browsers do.
We will place the FileSystemTree component on a Panel component to make its layout easier. We will
also add a Text component to tell us what kind of file is being shown and to let us know when a file is
not recognized. The application??™s size is the default 800 pixels by 600 pixels.
Pages:
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169