3
votes

Apparently, the new ActionScript Compiler 2.0 no longer supports the old [frame] metatag which allowed you to add preloaders to pure actionscript projects.

I've verified this IntelliJ - switching the "Prefer ActionScript Compiler 2.0 for pure ActionScript build configurations" makes a difference between the preloader being instantiated and executed, and the main class being instantiated and executed.

Googling yield no result, so is there currently any way around this issue - use ASC2.0 but have the benefits of the Frame metatag?

1
I've recently started using ActionScript Compiler 2.0, and I haven't encountered this issue. I use the commandline tool mxmlc, and the -frame parameter (seems to be) working as before. Since you're talking about a pure ActionScript project, mxmlc should be an option for you too (unless it actually is being ignored and somehow my project is still working!) - Dave
@Dave I am using the frame metatag, maybe that's the reason? Can you post exactly what you type for the "-frame" command-line parameter? - Maurycy
I run it like this mxmlc Loader.as -frame=ContentFrame,Main, which makes Loader.as into frame 1 and Main.as goes on a frame labelled ContentFrame. I actually don't use ContentFrame though, instead I wait until the SWF has loaded and use new (getDefinitionByName( "Main" ) as Class)( ) to create an instance of it within the Loader's class. It means that I get more control over animations. - Dave
@Dave Can you please post the way you do it as an answer? I've just checked and it seems to work with the -frame compiler option. - Maurycy
OK, I posted it. I guess this question is answered, but the better solution would be for Adobe to re-add the meta tag! - Dave

1 Answers

2
votes

This still works when using the mxmlc commandline tool;

mxmlc Loader.as -frame=ContentFrame,Main

(produces a 2-frame SWF; the first has no name and contains Loader, the second is named ContentFrame and contains Main).