Targeting the Flash Player 10 runtime

As we mentioned at the beginning of this chapter, Away3D 3.x targets the Flash Player 10 runtime. In order to compile an application using Away3D 3.x, your authoring tool needs to be configured to use a version of the Flex SDK 3.2 or above.

The Flex SDK can be freely downloaded from http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3. It is best to download the latest milestone release of the Adobe Flex SDK listed on the page. Once downloaded, extract the ZIP file to a convenient location.

Adobe Flex Builder and Adobe Flash Builder

These steps are only required in Flex Builder 3. In Flash Builder 4, the default Flex SDK is version 4.0, and the default target Flash Player version is 10.

  1. With your ActionScript project open, click Project | Properties.
  2. Select the ActionScript Compiler option from the left-hand pane. Make sure the Require Flash Player version checkbox is enabled, and enter 10.0.0 as the version. Now click on the Configure Flex SDKs link.
    Adobe Flex Builder and Adobe Flash Builder
  3. Click on the Add button.
  4. In the Add Flex SDK dialog box, type in the location where the Flex SDK was extracted to in the Flex SDK location textbox, or click on the Browse button to search for the directory.
  5. The Flex SDK name textbox should now show the name of the selected Flex SDK. Click on the OK button in the Add Flex SDK dialog box to return to the Preferences window.
  6. Enabling the checkbox next to the new SDK instructs Flex to use that SDK by default. Click on the OK button to return to the project properties window.
    Adobe Flex Builder and Adobe Flash Builder
  7. The version number shown next to the Use default SDK radio button in the Flex SDK version group box should be that of the new Flex SDK. Click on the OK button to close down the properties window.
Adobe Flex Builder and Adobe Flash Builder

FlashDevelop

When you install FlashDevelop for the first time you do have the option of also downloading a copy of the Flex SDK that already supports Flash Player 10. Or you can use the following steps to manually specify the location of a suitable Flex SDK:

  1. Click Tools | Program Settings….
  2. Select the AS3Context option in the left-hand pane, and click on the button with the three ellipses next to Flex SDK Location, which can be found in the group of options labeled Language.
    FlashDevelop
  3. Browse to the location where the Flex SDK has been extracted and click on the OK button.
  4. The Flex SDK Location should now show the updated location. Click on the Close button.
  5. With a FlashDevelop project open, click Project | Properties.
  6. Under the Output tab select Flash Player 10 from the Target drop-down list. Click on the OK button to save the changes.

Adobe Flash CS4

The following steps show you how to use the Flex SDK in Adobe Flash CS4:

  1. Click Edit | Preferences.
  2. Select the ActionScript option in the left-hand Category pane. Then click on the ActionScript 3.0 Settings... button.
  3. Type in the location where the Flex SDK was extracted to in the Flex SDK Path textbox, or browse to the folder location by clicking on the button with the folder icon at the end of the textbox.
  4. Click on the OK button to save the changes.
    Adobe Flash CS4
  5. Click on the OK button to close the Preferences window.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.26.231