Found a few resources on this:

1) http://kb2.adobe.com/cps/404/kb404341.html
2) 
http://74.125.93.132/search?q=cache:w_Jda-ZeRfUJ:www.morearty.com/blog/2009/01/23/how-to-capture-the-compilation-options-used-by-flex-builder/+flex+builder+release+build+options&cd=7&hl=en&ct=clnk&gl=us&client=safari

What I ended up doing was dumping the config xml from Flex Builder and from Ant 
and noticed that the difference was that FB targeted Flash Player 9.0.28 while 
Ant targeted 10.  Switching Ant to target 9.0.28 resolved the issue.  Of course 
this raises the issue: why does this work in 9.x but not 10.

--- In flexcoders@yahoogroups.com, "seanmcmonahan" <s...@...> wrote:
>
> So I posted a question about Ant build scripts for AIR a few weeks ago and 
> got some great answers, so here's another one.
> 
> I have an Ant build script that I'm using to build my AIR project.  It builds 
> everything and packages the application just fine.  The app runs with no 
> noticeable problems until you try to do any serialization with a class we 
> have: ElasticDictionary.  This class merely extends flash.utils.Dictionary 
> with some convenience methods (like length() -- code is below).  
> 
> I have the [RemoteObject] metadata and this works flawlessly when the project 
> is run from the Flex Builder debugger.  It also works perfectly when the 
> release build is exported via the Flex Builder Export Release Build... dialog.
> 
> So my question is: what am I missing in my Ant build script that Flex Builder 
> does for me?  The class, ElasticDictionary, is in the project's src folder 
> and I'm using the 3.4 SDK.
> 
> Relevant (at least what I *think* is relevant) code below.  Thanks in advance 
> for your help!
> 
> Ant Build Script:
> 
> <exec
>                       executable="${MXMLC}"
>                       failonerror="true">
>                               
>                       <arg value="-debug=false"/>
>                       <arg value="+flexlib=${SDK_HOME}/frameworks"/>
>                       <arg value="+configname=air"/>
>                       <arg value="-file-specs=${MAIN_SOURCE_FILE}"/>
>                       <arg value="-output=${BUILD_DIR}/${APP_ROOT_FILE}"/>
>                       <arg value="-keep-as3-metadata+=RemoteClass"/>
>                       
>                       
>                       <arg 
> value="-library-path+=${SDK_HOME}/frameworks/libs"/>
>                       <arg 
> value="-library-path+=${SDK_HOME}/frameworks/libs/air"/>
>                       
>                       <arg 
> value="-include-libraries=${LIBS_DIR}/applicationupdater.swc"/>
>                       <arg 
> value="-include-libraries=${LIBS_DIR}/Degrafa_Beta3.1_Flex3.swc"/>
>                       <arg value="-locale=en_US,fr_FR,de_DE"/>
>                       <arg value="-source-path=${LOC_DIR}/{locale}"/>
>                       <arg value="-source-path=${PROP_DIR}"/>
>                                       
>               </exec>
> 
> SDK_HOME refers to the location of the Flex 3.4 SDK.  LIBS_DIR points to the 
> project's SWC's.  LOC_DIR to localization files; PROP_DIR to properties 
> (.properties) files. 
> 
> ---
> 
> The ElasticDictionary class: 
> 
> /**
> * Used instead of ordinary dictionaries so that their data type can be 
> preserved when saving in a serailized format 
> */
> package com.project.utils {
>       
>       import flash.utils.Dictionary;
>       
>       [Bindable]
>       [RemoteClass]
>       public dynamic class ElasticDictionary extends Dictionary {
>               
>               public function ElasticDictionary(weakKeys:Boolean=false) {
>                       super(weakKeys);
>               }
>               
>               
>               public function get length():uint {
>               return getKeys().length;
>         }
> 
>         public function getKeys():Array {
>             var keys:Array = new Array();
>             for(var key:Object in this) {
>               keys.push(key);
>             }
>             return keys;
>         }
>         
>         public function getValues():Array {
>             var values:Array = new Array();
>             for(var key:Object in this) {
>               values.push(this[key]);
>             }
>             return values;
>         }
>               
>       }
> }
>


Reply via email to