I have this working in both Flex 1.2 w/Kit 1.0.1 and Flex 3 w/Kit
1.1.2
But what I found in Flex 3 is there are now 2 Commands:
Convert Symbol to Flex Component
Convert Symbol to Flex Container
I needed to use the 1st one "Flex Componet"
I also needed to change my code to use the Symbol Name not the
instance name > the Output message clued me in on this change-it said
Symbol "Ny_Metro_export" can be used as a Flex component.
in Flex I just used that name and Flex compiled and it runs.
<local:Ny_Metro_export id="nysMap"
scaleX="{(layoutCanvas.height/MAPHEIGHT)*.80}"
scaleY="{(layoutCanvas.height/MAPHEIGHT)*.80}" />
Other things to check:
-Besure you get a fresh swc > even delete it 1st to be sure your
publishing to the correct location.
-Besure you publish then trigger a recompile on the Flex side else
you are running an old version of the swc. To be sure I put trace
out in Flash with a number and I incrument the number. Then run the
Flex app in debug mode and you will see the trace.
--- In [email protected], "jrosenhaft" <[EMAIL PROTECTED]> wrote:
>
> (I also posted this on the adobe labs forum. Apologies if you see
it
> twice)
>
> I've tried several examples of using the flex component kit for
Flash
> AS3 and none of them are working for me. Whenever I run
the "Convert
> Symbol to Flex Component Command," I get the following output:
>
> Command made the following changes to the FLA:
> Turned on Permit Debugging
> Turned on Export SWC
> Set frame rate to 24
> Imported FlexComponentBase component to library
> Symbol "BallComponent" can be used as a Flex component.
> Select File > Publish to create the SWC file for use in Flex.
>
> This appears to be correct but after adding the SWC to the flex
> library, my flex application does not seem to "see" the new
> component. I've managed to pull in components that others have
made
> with Flash AS3 and the component kit so I don't think I'm doing
> anything wrong on the flex side.
>
> I noticed that in Flash, FlexComponentBase does not show up in my
> library after converting my symbol to a flex component.
> Additionally, nothing happens when I drag FlexComponentBase into my
> library. It just doesn't show up. When I go to the properties
> dialog for my exported component and try to validate
> mx.flash.UIMovieClip, I get the following message:
>
> A definition for the base class could not be found in the
classpath.
> Please enter the name of a class that is defined in the classpath,
or
> enter the default base class 'flash.display.MovieClip'.
>
> I suspected there was something wrong with my installation of Flash
> CS3 or the Component Kit so I just uninstalled and reinstalled
Flash
> CS3, Flex Builder, and the component kit with the same results.
>
> I've now seen the same behavior with Flash CS3 9.0.2, Flex Builder
3
> (tried both beta 2 and beta 3), and component kit 1.1.2.
>
> Has anyone seen this behavior before?
>
> Thanks in advance,
> Jake
>