views:

176

answers:

1

I'm creating some custom components and backing code. I've created a Flex library project in Flash Builder which compiles to a SWC. The problem is now that all my MXML files get compiled into classes in the default package, making the whole thing a big mess.

Is there a way to set a package declaration for MXML files? After all it just gets translated into AS3 classes. This seems to work in regular Flex projects using a namespace declaration so I'm at a loss how that is supposed to work.

The other option is building out all the components in AS3 which I'd like to avoid.

Any ideas? Many thanks in advance.

Cheers, Jakob

A: 

Ok, after three hours of reading bugs in Adobe's database I figured it out. It seems to be a bug in Flash Builder Beta 2: http://bugs.adobe.com/jira/browse/FB-23453 (There's actually several similar reports)

In your library project under "Flex Library Build Path" -> "Classes" use option "Select classes to include in library" instead of "Include all classes from all source paths". This fixes a whole lot of problems, ranging from the packaging problems described about to manifest.xml related problems like "could not find source for class foo.Bar in namespace FOOBAR".

Hope that saves you the time I just wasted on that issue.

ilikeorangutans