31.07.2013 Views

Building Adobe AIR Applications

Building Adobe AIR Applications

Building Adobe AIR Applications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

BUILDING ADOBE <strong>AIR</strong> APPLICATIONS<br />

Creating your first <strong>AIR</strong> application<br />

Next, you will change some settings in the application descriptor to allow the application to be transparent:<br />

1 In the Flex Navigator pane, locate the application descriptor file in the source directory of the project. If you named<br />

your project <strong>AIR</strong>HelloWorld, this file is named <strong>AIR</strong>HelloWorld-app.xml.<br />

2 Double-click the application descriptor file to edit it in Flash Builder.<br />

3 In the XML code, locate the commented lines for the systemChrome and transparent properties (of the<br />

initialWindow property). Remove the comments. (Remove the "" comment delimiters.)<br />

4 Set the text value of the systemChrome property to none, as in the following:<br />

none<br />

5 Set the text value of the transparent property to true, as in the following:<br />

true<br />

6 Save the file.<br />

Test the <strong>AIR</strong> application<br />

To test the application code that you’ve written, run it in debug mode.<br />

1 Click the Debug button in the main toolbar.<br />

You can also select the Run > Debug > <strong>AIR</strong>HelloWorld command.<br />

The resulting <strong>AIR</strong> application should look like the following example:<br />

2 Using the horizontalCenter and verticalCenter properties of the Label control, the text is placed in the center<br />

of the window. Move or resize the window as you would any other desktop application.<br />

Note: If the application does not compile, fix any syntax or spelling errors that you inadvertently entered into the code.<br />

Errors and warnings are displayed in the Problems view in Flash Builder.<br />

Last updated 7/8/2013<br />

21

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!