views:

62

answers:

1

I have used Flash to make skins, which I import and apply to Flex components.

But how can I create a component in Flash, with properties and methods. And make it able to be added to the displayList in a Flex app?

I installed the Flex component kit for flash. Created my component in flash (it extends MovieClip). Did Command->Convert to flex Component, did File->Published, which gave me a .swc, dropped the .sec file into my Flex project. Now when I create a new var the class "FlashFlexComponentTest" pops up in the new class hint box, so flex sees it. But afterwards I get the error:

Type was not found or was not a compile-time constant: FlashFlexComponentTest

I feel like I must be missing a step?

Thanks!

UPDATE

I added the .swc via project build path -> add SWC. I no longer have a compile-time error but I am getting a runtime error:

Type Coercion failed: cannot convert FlashFlexClassTest@9089129 to mx.core.IUIComponent

A: 

There's a good video tutorial on this at Linda.com by David something. I did a lot of this a year or so ago, and that was the best resource I found. Doesn't cover absolutely every possible angle, but does a great job of covering what you need to know.

I'm guessing there's just some small linkage detail that you're missing. The tutorial should get you straight, if that's the case. It was worth the $20, or whatever, for a monthly subscription for me.

Sorry, that's the best I can do... haven't built Flex components in Flash since last year.

Ross Henderson
Well I am wondering if maybe I should have used Command->Convert to flex Container instead of component. Thanks ill look for the linda video.
John Isaacks