6. Using Flex Builder 3

 Documentation Summary
 Page Summary

Configuration

In order to use GDS sample applications with Flex Builder 3 (2 should work but has not been tested), you must add two files and customize your .project as follows (using graniteds-ejb3 as example):

.actionScriptProperties
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties mainApplicationPath="Persons.mxml" version="3">
  <compiler
    additionalCompilerArguments="
      -locale en_US
      -services WEB-INF/flex/services-config.xml
      -context-root /graniteds-ejb3
      -include-libraries ../../lib/granite-essentials.swc
    "
    copyDependentFiles="false"
    enableModuleDebug="true"
    generateAccessible="false"
    htmlExpressInstall="true"
    htmlGenerate="false"
    htmlHistoryManagement="false"
    htmlPlayerVersion="9.0.28"
    htmlPlayerVersionCheck="true"
    outputFolderPath="build/swf"
    rootURL="http://localhost:8080/graniteds-ejb3/"
    sourceFolderPath="ear/addressbook.war"
    strict="true"
    useApolloConfig="false"
    verifyDigests="true"
    warn="true">
    <compilerSourcePath>
      <compilerSourcePathEntry kind="1" linkType="1" path="as3"/>
    </compilerSourcePath>
    <libraryPath defaultLinkType="1">
      <libraryPathEntry kind="4" path=""/>
      <libraryPathEntry kind="3" path="/desktop_ejb/lib/granite.swc"/>
    </libraryPath>
    <sourceAttachmentPath/>
  </compiler>
  <applications>
    <application path="Persons.mxml"/>
  </applications>
  <modules/>
  <buildCSSFiles/>
</actionScriptProperties>

Note that the additionalCompilerArguments attribute value should be written on a single line.

As you can see, granite-essentials.swc is entirely merged in your swf while granite.swc is only loosely linked with your code (only explicitly used classes will be included in your swf).

.flexProperties
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flexProperties flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="1"/>

You must then add a flexnature and an actionscript nature to the project, which can be done via the contextual menu on the project, resulting in the following .project file:

.project
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>graniteds_ejb3</name>
    <comment>Granite Data Services EJB3 Demo</comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>com.adobe.flexbuilder.project.flexbuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.jdt.core.javanature</nature>
        <nature>com.adobe.flexbuilder.project.flexnature</nature>
        <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
    </natures>
</projectDescription>

Browse Space

- Pages
- Blog
- Labels
- Attachments
- Bookmarks
- Mail
- Advanced

Explore Confluence

- Popular Labels
- Notation Guide

Your Account

Log In

Other Features

Add Content

- Add Comment


SourceForge.net Logo
Copyright © 2007-2010 Adequate Systems. All Rights Reserved.