6 Replies Latest reply on May 19, 2009 12:37 PM by dc@Adobe

    specifying flash version in ant build file

    kilyas2007 Level 1

      I am working on an application which requires some deep linking for the purpose I am using the BrowserManager API whihc seems to be working fine, once in Adoble flex builder I change

      Project>Propoerties>Flex Compiler>Require Flash Player Version

       

      to 9.0.124

       

      However once I do the build using an ant build file, though it compiles successfully it fails to deliver the required results.  The ant task is as follows:-

       

           <java jar="${FLEX_HOME}/lib/mxmlc.jar" fork="true" maxmemory="800m" failonerror="true">
                  <jvmarg value="-Dapplication.home=${FLEX_HOME}" />
                  <arg line="-actionscript-file-encoding='UTF-8'" />
                  <arg line="-keep-generated-actionscript='true'" />
                  <arg line="-incremental='true'" />
                  <arg line="-load-config='${FLEX_HOME}/frameworks/flex-config.xml'"/>
                  <arg line="-source-path='${FLEX_HOME}/frameworks'"/>
                  <arg line="-compiler.source-path='${APP_ROOT}/cairoLib'"/>
                  <arg line="-compiler.library-path+='${APP_ROOT}/flexStaticLibs/libs'"/>
                  <arg line="-output=${war}/Cairo.swf" />
                  <arg line="${cairoFlex}/Cairo.mxml" />

       

               </java>

       

       

      Is there a way I could specify the required build version here in the ant task as well.  Thanks in advance.

        • 1. Re: specifying flash version in ant build file
          injpix Level 3

          In flex-config.xml, does the <target-player> tag have the desired FlashPlayer version?

           

          Are you using Adobe® Flex® Ant?

          • 2. Re: specifying flash version in ant build file
            kilyas2007 Level 1

            Yes I have already made that configuration in flex-config.xml but to no use.

             

             

            <target-player>9.0.124</target-player>

             

            Is there any argument I could use in the ant task:-

             

             

             

             

             

             

             

             

             

             

             

             

             

             

            <java jar="${FLEX_HOME}/lib/mxmlc.jar" fork="true" maxmemory="800m" failonerror="true"

            >

             

             

            <jvmarg value="-Dapplication.home=${FLEX_HOME}"

            />

             

             

            <arg line="-actionscript-file-encoding='UTF-8'"

            />

             

             

            <arg line="-keep-generated-actionscript='true'"

            />

             

             

            <arg line="-incremental='true'"

            />

             

             

            <arg line="-load-config='${FLEX_HOME}/frameworks/flex-config.xml'"

            />

             

             

            <arg line="-source-path='${FLEX_HOME}/frameworks'"

            />

             

             

            <arg line="-compiler.source-path='${APP_ROOT}/cairoLib'"

            />

             

             

            <arg line="-compiler.library-path+='${APP_ROOT}/flexStaticLibs/libs'"

            />

             

             

            <arg line="-output=${war}/Cairo.swf"

            />

             

             

            <arg line="${cairoFlex}/Cairo.mxml"

            />

             

             

             

            </java>

            • 3. Re: specifying flash version in ant build file
              injpix Level 3

              Look at 'target-player=player_version' row.  So it would look like this:

               

              <arg line= "-player_version=10.0.0" />
              or this:
              <arg line= "-target-player=10.0.0" />
              

               

              What do you mean by, "...it fails to deliver the required results"?  Do you get compile errors when you do an Ant build or something doesnt function in your application?  Also I am unsure what you mean by "...required build version...".  Are you refering to debug/release builds?

              • 4. Re: specifying flash version in ant build file
                kilyas2007 Level 1

                What I mean by incorrect response is that if in the code I have:-

                 

                 

                IBrowserManager

                browserManager = BrowserManager.getInstance();

                browserManager.init(

                "", "Welcome to Dashboard");

                 

                when the init mehtod is called over here it is expected that it would initialize the browserManager object such that

                 

                browserManager.base

                 

                would contain the the url posted in the address bar.  When in Adoble flex builder I changed:-

                 

                Project>Propoerties>Flex Compiler>Require Flash Player Version

                 

                value from 9.0.0 to 9.0.124

                 

                it started working properly however with ant build though it compiled successfully it always displays null.

                 

                I also tried

                <arg line= "-player_version=10.0.0" />

                or this:

                <arg line= "-target-player=10.0.0" />

                 

                where with arg player_version it failed to compile with ant build while -target-player siccessfully compiled but didn't give the desirable results as mentioned above.

                 

                Thanks

                • 5. Re: specifying flash version in ant build file
                  injpix Level 3

                  Well, after doing some research, I found that in order for deep linking to work, the application needs to have the "Enable integration with browser navigation" option checked.  And also, the application's HTML wrapper needs to have: history.css; history.js; historyFrame.html.

                   

                  So check your application's HTML wrapper.  If that doesnt help, I suggest to use Adobe Flex Ant.

                   

                  Here is my source:

                  Deploying applications that use deep linking

                  • 6. Re: specifying flash version in ant build file
                    dc@Adobe

                    The issue isn't related to the flash player version. It's the template and subfolders that need to be added as per:

                    http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Deep_Linking
                    "If you use Flex Builder, you must choose one of the HTML templates that support the BrowserManager. Go to the project's Properties dialog, select "Flex Compiler" and ensure that the "Enable integration with browser navigation" is checked.
                    If you don't use Flex Builder, you should modify one of the index.template.html files in a template folder that ends with "with-history". You'll need to copy the support files in the subfolders as well. "