1 Reply Latest reply on Dec 9, 2010 2:21 PM by billisntbill

    Bug in JSFL exportPublishProfileString?

    billisntbill

      I'm running in to a problem when exporting profiles that use AS3 Config Constants.  It looks like when exporting a profile with JSFL the AS3ConfigConst value is always that of the default profile, not the profile you've asked to export.

       

      e.g. var flash_profile = new XML(fl.getDocumentDOM().exportPublishProfileString('profilename'));

       

      The AS3ConfigConst portion is always that of the 'default' publish profile (meaning the profile that has a check next to its name, not 'Default').  To test this I have done the following.

       

      1. Create two profiles in a new .fla.  The profiles I created are profile1 and profile2.

      2. In profile1, go to 'Flash', click the ActionScript 3.0 settings button, click on 'Config constants'.  Give the document a class of 'profile1'.  Add a config constant, call it 'profile1' with a value 'true'.

      3. Do the same thing in profile2, using profile2 in place of profile1.

      4. Save the file.  Go back in to publish settings and change the profile to 'profile1'.  Save the file again.

      5. Create the following script:

       

      var flafile = 'pathtofile.fla';

      fl.outputPanel.clear();

      fl.openDocument('file://'+flafile);

      var flash_profile = new XML(fl.getDocumentDOM().exportPublishProfileString('profile1'));

      fl.outputPanel.trace(flash_profile.toXMLString());

       


      6. Execute the script, it should display in the 'output' pane XML for profile1.  If you scroll down and find AS3ConfigConst it should have profile1="true".

      7. Close the .fla and don't save it.

      8. Create the following script:

       

      var flafile = 'pathtofile.fla';

      fl.outputPanel.clear();

      fl.openDocument('file://'+flafile);

      var flash_profile = new XML(fl.getDocumentDOM().exportPublishProfileString('profile2'));

      fl.outputPanel.trace(flash_profile.toXMLString());

       

      9. Execute the script.  If you look for AS3ConfigConst, you'll notice that it still says profile1="true".

       

      I've updated to the latest version of CS5 and the problem persists.  Has anyone else run in to this?  I can export the profile from within the CS5 profile settings page without a problem, this only seems to occur when using JSFL to accomplish the same thing.

       

       

      Thanks,

      Bill