If you ever need to export a file from Flash IDE using MinimalComps and/or WCK, you might run into the same issues I did today. Took me quite some time to find a solution, so hopefully this can be a time saver for someone.

MinimalComps in Flash CS5
- get MinimalComps
- Flash IDE > Publish > Profile > ActionScript Settings > Library Path > Add New Path
- browse to MinimalComps_[version].swc

Now in the first frame, type something like:

import com.bit101.components.PushButton;
var pushButton:PushButton = new PushButton(this, 10, 10, "PUSH ME");

When you compile, you should get these errors:

VerifyError: Error #1014: Class mx.core::FontAsset could not be found.
ReferenceError: Error #1065: Variable Component_Ronda is not defined.

A good hint to fix this can be found on the comments of minimalcomps Issue 141, where Keith Peters says flex.swc must be added to the library as well. Unfortunately it didn’t work for me, probably due to different SDK versions. So if you’re using Flex SDK 4.1 or Flex 4.5, what you need to add is framework.swc.

[path to sdk]\frameworks\libs\framework.swc

 

WCK in Flash CS5 – new World()
- get WCK
- Flash IDE > Publish > Profile > ActionScript Settings > Library Path > Add New Path
- browse to Box2D.swc

On the first frame, type:

import wck.World;
var world:World = new World();

When you compile, you should get this error:

1136: Incorrect number of arguments. Expected 2.

If you open World.as you’ll notice that there is no constructor, so it can’t be missing 2 arguments. Even if you delete the wck.World import line, the error message is the same. Where is this World class coming from? I’ll let Fumio Nonaka from JActionScripters answer:

According to […] the blog article “Flash CS5 Built-in Physics Discovered“, the class World is a part of physics engine in the inverse Inverse Kinematics framework. And once the API was planned to release with the “Physics” panel but was abandoned by Adobe.

This abandoned Physics library is in the PffLib.swc file which is referenced by default in your .fla: $(AppConfig)/ActionScript 3.0/libs. Just add flash.swc to the end of that line.

$(AppConfig)/ActionScript 3.0/libs/flash.swc

That’s it.


No Comments on “MinimalComps and WCK in Flash IDE”

You can track this conversation through its atom feed.

No one has commented on this entry yet.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>