Skip to main content
Known Participant
March 16, 2013
Question

fatal error building from command line (EmbeddedMovieClip not found)

  • March 16, 2013
  • 1 reply
  • 1190 views

I've been unable to build with the command line since embedding a swf file in my project.  If I do "export release build" from builder, it's ok, but that is insufficient for my needs.  I really need to be able to build with ant from the command line.  Here is my error:

Error: Could not find definition flash.compiler.embed.EmbeddedMovieClip referenced by embedded source C:\_projects\MyGame\src\embed\loadingGraphicAnimation.swf.

Warning: Definition flash.compiler.embed.EmbeddedMovieClip could not be found.

Error: The definition of base class EmbeddedMovieClip was not found.

I'm using FlashBuilder 4.7 with AIRSDK 3.7 (although I have the same problem with 3.6 and 3.5).

Since it works from FlashBuilder as export release build, there must be a way to get it to work.  Clearly I'm just missing something.

Can anyone help me figure out what it is I'm missing that doesn't allow the EmbeddedMovieClip class to be found and used on this swf embed?

EDIT:  A workaround I found was to embed the swf as binary, and then Loader.loadBytes() on an instance of it.  This works, but it means I'll have to change a bunch of code across many projects. 

[Embed(source="/embed/loadingGraphicAnimation.swf", mimeType="application/octet-stream")]

private static var LoadingSwf: Class;

_loadingSwf = new Loader();

_loadingSwf.loadBytes(new LoadingSwf());

addChild(_loadingSwf);

Thanks!

Craig

PS It would be really awesome to be able to see what "export release build" actually does.  I'm not even asking to be able to change it's settings, just to see them would be extremely helpful.  If there is such a way, I have not found it.  Anyone know if there is a config file somewhere that manages that?

This topic has been closed for replies.

1 reply

Inspiring
April 26, 2017

I know that this is a very old thread, but I can add some information that might be useful if someone runs into the same issue today.

The AIR SDK & Compiler contains a file named asc-support.swc that includes the definition for flash.compiler.embed.EmbeddedMovieClip. You can find this file at [AIR SDK path]/frameworks/libs/asc-support.swc. The SWF that you are embedding was probably built with the AIR SDK & Compiler. If your project in Flash Builder 4.7 is an ActionScript project (not a Flex project), it probably also uses the AIR SDK & Compiler when it creates a release build, so this class will be present.

However, if your build script uses the Flex SDK to compile, that could explain why flash.compiler.embed.EmbeddedMovieClip is missing. I don't see asc-support.swc in the Flex SDK, and I suspect that it isn't in any other SWCs either. I'll bet that the "asc" in asc-support.swc refers to the ASC 2.0 compiler, which is the new compiler used by the AIR SDK. The Flex SDK has a different compiler, and it uses some different classes, notably mx.core.MovieClipAsset, when it embeds assets.

Anyway, if you're trying to build an app with the Flex SDK, and you get this error, you might try grabbing asc-support.swc from the AIR SDK & Compiler and adding it to your library path. Another option would be to skip the Flex SDK entirely (as long as you're not using MXML and the Flex framework, of course) and compile with the new compiler in the AIR SDK & Compiler instead.