I'm practicing on make a component with Flash(actually, a simple animating MovieClip symbol for the test) which could be used in Flex. I checked the documents on the web, however there was also a problem. I did like this:
I copied the swc file which generated by Flash into libs path of the flex project. Then the swc class could be displayed and chose in the code hint. I made an instance of that class, and addElement(i) - i for instance for example. Then I received a compile time error said that the instance was not a type of IVisualElement. So I trace(i is MovieClip, i is UIMovieClip, i is FlexMovieClip, i is UIComponent) and returned 1 true and 3 falses.
Was The problem in Flash or in Flex? I had no idea on fix this. Can anybody help?
Hi, Flex harUI. Thanks for reply. I'm using Flash CS5.5. I noticed that there's already the kit built-in. I select the create Flex component thing in command menu, and in output panel it told me turned on the debug feature and publishing for SWC for me, and let me just publish it. Was that right?
I’ve never really used it. There should be blog and devnet articles on it. Somehow you have to associate the library symbol with the UIMovieClip or similar classes before publishing the SWC. I think that’s the step you are missing.