31.07.2013 Views

Building Adobe AIR Applications

Building Adobe AIR Applications

Building Adobe AIR Applications

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Using native extensions for <strong>Adobe</strong> <strong>AIR</strong><br />

Including the ANE file in your application’s library path<br />

To compile an application that uses a native extension, include the ANE file in your library path.<br />

Using the ANE file with Flash Builder<br />

If your application uses a native extension, include the ANE file for the native extension in your library path. Then you<br />

can use Flash Builder to compile your ActionScript code.<br />

Do the following steps, which use Flash Builder 4.5.1:<br />

1 Change the filename extension of the ANE file from .ane to .swc. This step is necessary so that Flash Builder can<br />

find the file.<br />

2 Select Project > Properties on your Flash Builder project.<br />

3 Select the Flex Build Path in the Properties dialog box.<br />

4 In the Library Path tab, select Add SWC....<br />

5 Browse to the SWC file and select Open.<br />

6 Select OK in the Add SWC... dialog box.<br />

The ANE file now appears in the Library Path tab in the Properties dialog box.<br />

7 Expand the SWC file entry. Double-click Link Type to open the Library Path Item Options dialog box.<br />

8 In the Library Path Item Options dialog box, change the Link Type to External.<br />

Now you can compile your application using, for example, Project > Build Project.<br />

Using the ANE file with Flash Professional<br />

If your application uses a native extension, include the ANE file for the native extension in your library path. Then you<br />

can use Flash Professional CS5.5 to compile your ActionScript code. Do the following:<br />

1 Change the filename extension of the ANE file from .ane to .swc. This step is necessary so that Flash Professional<br />

can find the file.<br />

2 Select File > ActionScript Settings on your FLA file.<br />

3 Select the Library Path tab in the Advanced ActionScript 3.0 Settings dialog box.<br />

4 Select the Browse To SWC File button.<br />

5 Browse to the SWC file and select Open.<br />

The SWC file now appears in the Library Path tab in the Advanced ActionScript 3.0 Settings dialog box<br />

6 With the SWC file selected, select the button Select Linkage Options For A Library.<br />

7 In the Library Path Item Options dialog box, change the Link Type to External.<br />

Packaging an application that uses native extensions<br />

Use ADT to package an application that uses native extensions. You cannot package the application using Flash<br />

Professional CS5.5 or Flash Builder 4.5.1.<br />

Details about using ADT are at <strong>AIR</strong> Developer Tool (ADT).<br />

Last updated 7/8/2013<br />

144

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

Saved successfully!

Ooh no, something went wrong!