1) -target-player option
On Thu, May 24, 2012 at 3:58 PM, Carol Frampton <[email protected]> wrote:
> I just learned this tidbit that relates to this thread. -target-player is
> parsed and is used to replace the tokens
>
> {targetPlayerMajorVersion} and {targetPlayerMinorVersion} that appear in
> any of the config files specified for mxmlc.
>
That makes sense, Carol. I did some testing with a very simple AS3 app:
package {
import flash.display.Sprite;
public class SampleApp extends Sprite{
public function SampleApp(){
}
}
}
If compile that application using this command
mxmlc SampleApp.as -static-link-runtime-shared-libraries
everything works as expected. Using the option "-target-player 12"
mxmlc SampleApp.as -target-player 12 -static-link-runtime-shared-libraries
I get the following error: Error: unable to open
'libs/player/12.1/playerglobal.swc'
As you said, the value of the -target-player option is used when
constructing the path to the playerglobal.swc.
2) -swf-version option
Now I tested the -swf-version option. That's interesting, since I can
use any random number, e.g. 99. What the compiler does is write that
number into the SWF file, as I confirmed using the swfdump tool:
mxmlc SampleApp.as -swf-version 99 -static-link-runtime-shared-libraries
Resulting output with swfdump for the generated SWF file:
raju@titan:~/test$ swfdump SampleApp.swf | more
<!-- Parsing swf file:/home/raju/test/SampleApp.swf -->
<!-- ?xml version="1.0" encoding="UTF-8"? -->
<swf xmlns='http://macromedia/2003/swfx' version='99'
framerate='24' size='10000x7500' compressed='true' >
As you can see, that values get's written into the version attribute
for the swf tag. In binary format, that's the 4th byte in the SWF
file:
First 4 bytes of the SWF without the -swf-version option, with Flex SDK 4.6
43 57 53 0E
First 4 bytes of the SWF witht the option "-swf-version 99"
43 57 53 63
But other sections of the files differ as well, so I'm not sure what
else the -swf-version option does during compilation.
Thanks,
Raju