Mitya
Mitya

Reputation: 1023

SWC File fails to load in Design Mode

I am exporting an SWC via Flash Professional CS5 version 11.0.0.485 with the latest Flex Component Kit (2.0.0) installed in the Extension Manager.

In Symbol properties, I'm Exporting for Actionscript in Frame 1 with the Class name equal to the Symbol name.

I've imported the SWC into Flash Builder 4.6 with all the different available SDKs.

With all of them I get an error in Design Mode

"SWC File Failed to load. Any component dependent on this SWC will not be displayed in the design mode."

If I instantiate the component via the Source it runs ok and in the browser I see the component.

I know I could just say "whatever, I don't need Design mode" but I'd like to know what is happening.

Any ideas?

Upvotes: 2

Views: 1398

Answers (2)

Mitya
Mitya

Reputation: 1023

What fixed this for me was changing the link type of the SWC from external to merged in code.

You can do this by right clicking on the SWC in the package explorer to bring up the Build Path window, selecting "Link Type" and clicking "Edit". There should be a drop down with one of the option being "Merged into Code".

I'm not 100% sure why this fixed the problem but I suspect it has to do with the fact that the SWC library is not included at compile-time if it is an external linkage and this interfered with Design View functionality.

Upvotes: 1

Todd Moses
Todd Moses

Reputation: 11029

From Adobe: The format of a Flash CS4 or later SWC file is compatible with the Flex SWC format so that SWC files can be exchanged between the two products, but not necessarily without modifications.

Take a look at this: http://forums.adobe.com/message/4094805#4094805

It appears to be a bug in FlashBuilder 4.6.

Upvotes: 0

Related Questions