Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SublimeText2 MXMLC compile and run buildfile
{
"cmd": ["/Users/newtriks/Library/Plugins/sdks/flex_sdk_4.6.0.23201B/bin/mxmlc",
"$file",
"-static-link-runtime-shared-libraries=true"],
"file_regex": "(.*)[(](\\d+)[)]:(?: col: (?:\\d+))? *Error: (.*)",
"selector": "source.actionscript",
"variants": [
{ "cmd": ["open ${file_path}/${file_base_name}.swf"],
"shell": true,
"name": "Run"
}]
}
@newtriks

This comment has been minimized.

Show comment
Hide comment
@newtriks

newtriks Jul 17, 2012

Wanted this to work but no dice :(

"cmd": ["bash", "-c", "open -a 'Flash Player' $(/Users/newtriks/Library/Plugins/sdks/flex_sdk_4.6.0.23201B/bin/mxmlc $file | tail -n 1 | sed 's/[[:space:]].*$//')"],
"shell": true,
Owner

newtriks commented Jul 17, 2012

Wanted this to work but no dice :(

"cmd": ["bash", "-c", "open -a 'Flash Player' $(/Users/newtriks/Library/Plugins/sdks/flex_sdk_4.6.0.23201B/bin/mxmlc $file | tail -n 1 | sed 's/[[:space:]].*$//')"],
"shell": true,
@antoniobrandao

This comment has been minimized.

Show comment
Hide comment
@antoniobrandao

antoniobrandao Jun 1, 2013

Hello Newtriks,

Is there a way to make the compiled SWF go to a folder within the parent folder?

My .as files are in "src" and I would like to published SWF to go to a "bin" folder in the same level.

Also, I got an error while trying to run the SWF by pressing cmd+shift+B - but it worked if I remove "${file_path}/".

Thanks,
Antonio

Hello Newtriks,

Is there a way to make the compiled SWF go to a folder within the parent folder?

My .as files are in "src" and I would like to published SWF to go to a "bin" folder in the same level.

Also, I got an error while trying to run the SWF by pressing cmd+shift+B - but it worked if I remove "${file_path}/".

Thanks,
Antonio

@newtriks

This comment has been minimized.

Show comment
Hide comment
@newtriks

newtriks Jun 18, 2013

Hi Antonio,

Try adding "-load-config+=${file_path}/../config.xml" to the cmd: array. Then add a config.xml file to your project stipulating an output target: <output>/Users/newtriks/Projects/foo/app/assets/flash/player.swf</output>. For example:

<?xml version="1.0"?>
<flex-config>
   <target-player>11.1</target-player>
    <swf-version>14</swf-version>
   <compiler>
      <accessible>true</accessible>
    <source-path>
         <path-element>lib/services/</path-element>
         <path-element>lib/utils/</path-element>
      </source-path>
      <show-actionscript-warnings>true</show-actionscript-warnings>
      <debug>false</debug>
      <library-path>
         <path-element>lib</path-element>
      </library-path>
      <optimize>true</optimize> 
   </compiler>
   <output>/Users/newtriks/Projects/foo/app/assets/flash/player.swf</output>
</flex-config>
Owner

newtriks commented Jun 18, 2013

Hi Antonio,

Try adding "-load-config+=${file_path}/../config.xml" to the cmd: array. Then add a config.xml file to your project stipulating an output target: <output>/Users/newtriks/Projects/foo/app/assets/flash/player.swf</output>. For example:

<?xml version="1.0"?>
<flex-config>
   <target-player>11.1</target-player>
    <swf-version>14</swf-version>
   <compiler>
      <accessible>true</accessible>
    <source-path>
         <path-element>lib/services/</path-element>
         <path-element>lib/utils/</path-element>
      </source-path>
      <show-actionscript-warnings>true</show-actionscript-warnings>
      <debug>false</debug>
      <library-path>
         <path-element>lib</path-element>
      </library-path>
      <optimize>true</optimize> 
   </compiler>
   <output>/Users/newtriks/Projects/foo/app/assets/flash/player.swf</output>
</flex-config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment