0
votes

I am refactoring a hugh action script solution in Flash builder (beta 2) using the flex 4 sdk. The project does NOT use the mx framework.

What i want to have is:

  • A big 'MAIN' project
  • several small 'MODULE' projects. each 'MODULE' class refrences the 'MAIN' project as an External reference (doesnt compile into swf) - this is done by setting link type = external in the 'MODULE' project properties -> library path.
  • 'MAIN' loads a 'MODULE' project on runtime using the 'loader' class.

the problem: I recieve an error from the MODULE project:

VerifyError: Error #1014: Class [some class in MAIN] could not be found.

PLEASE HELP!

2

2 Answers

0
votes

Check which application domain you are loading your module into. The app domain needs to be able to access the class you have externalised or you'll get that error.

0
votes

It might just be a bug with the beta version of the sdk. It seems like the import of a class in a module created in another project doesn't force it's inclusion in the main swf.

try putting a dummy dependency in you main application class, like:

private var forcedImports:Array = [MyClass];

It fixed some of my problems before.