Roger,
thanks for your feedback on using custom Flash components in Flex 2.
But this doesn't explain why the custom swc example didn't work in Flex
1.5 either.
Has anyone else had problems using custom swc that couldn't be "Parse"
in Flex?
Kai
Roger Gonzalez wrote:
> This recipe is for Flex 1.5.
>
> There is no way to combine the AS2 code generated in Flash 8 with the
> AS3 code used in Flex 2.
>
> The supported interaction for associating a Flash 8 asset with a
> component is basically as follows:
>
> 1) Build an asset in Flash 8, with no code.
> 2) Convert it to a symbol.
> 3) Set its properties such that it is exported with a name, say "foo".
> 4) Export it in a SWF, say "assets.swf".
> 5) Create a new actionscript file, perhaps Foo.as:
>
> // Foo.as
> package
> {
> [Embed(source='assets.swf', symbol='foo')]
> public class Foo extends mx.core.SkinSprite
> {
> }
> ]
> 6) Add your new component to the MXML:
>
> <Foo />
>
>
> There are some other ways to do this, but essentially you'll need to
> keep all the code on the Flex 2 side, and only deal with the assets on
> the Flash 8 side. This is a temporary and somewhat awkward period where
> versions are a bit out of sync. Once the next version of Flash
> Authoring is out and supporting AS3, you'll be able to mix-n-match more
> easily.
>
> -Roger
>
> Roger Gonzalez
> mailto:[EMAIL PROTECTED]
>
>
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Kai Pradel
> > Sent: Monday, November 07, 2005 11:33 AM
> > To: [email protected]
> > Subject: [flexcoders] Custom components in Flex 2
> >
> > Hi there,
> >
> > I've been trying to create a simple custom component in Flash 8 (IDE)
> > and embed it into my mxml project (Flex Builder 2) but have
> > been unable
> > to make it work. I have tried both using Flex 1.5 and 2.0
> > Alpha but to
> > no avail.
> >
> > I followed this tutorial step-by-step
> > (http://download.macromedia.com/pub/documentation/en/flex/15/f
> > lex_components_themes.pdf)
> > but every time I try to compile the application, I get an error.
> >
> > Embed Code:
> > <?xml version="1.0" encoding="utf-8"?>
> > <mx:Application
> > xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns="*">
> > <greensquare/>
> > </mx:Application>
> >
> > Error in Flex 2: After adding the component to the library the IDE
> > let's me compile but stops in the middle with the following error
> > message: "Errors exist in required project: greentest". No
> > more detail
> > is given and the red error dot in the IDE is not showing up either.
> >
> > Error in Flex 1.5:
> > "Don't know how to parse element: greensquare. it's not a
> > knows type or
> > property..."
> >
> > I know the component works because I can use it in the Flash
> > IDE. Also,
> > I have verified that the class path is set correctly.
> >
> > I have looked everywhere but haven't been able to find a
> > solution. Has
> > anyone had success creating custom components in Flash IDE for Flex?
> >
> > Thanks,
> > Kai
> >
> >
> >
> >
> >
> > --
> > -------------------------------------------------------------
> > Kai Christian r E-Mail: [EMAIL PROTECTED]
> > Phone: 617.423.6200 x 112
> > Productorials, Inc. Fax: 617.507.8577
> > 374 Congress Street Mobile: 617.792.6327
> > Suite 304 WWW: www.productorials.com
> > Boston, MA 02210 Skype: callto:kaipradel
> > -------------------------------------------------------------
> >
> >
> > ------------------------ Yahoo! Groups Sponsor
> > --------------------~-->
> > Get Bzzzy! (real tools to help you find a job). Welcome to
> > the Sweet Life.
> > http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
> > --------------------------------------------------------------
> > ------~->
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
>
>
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
> * Visit your group "flexcoders
> <http://groups.yahoo.com/group/flexcoders>" on the web.
>
> * To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------------------------------------------------
>
--
-------------------------------------------------------------
Kai Christian Pradel E-Mail: [EMAIL PROTECTED]
Phone: 617.423.6200 x 112
Productorials, Inc. Fax: 617.507.8577
374 Congress Street Mobile: 617.792.6327
Suite 304 WWW: www.productorials.com
Boston, MA 02210 Skype: callto:kaipradel
-------------------------------------------------------------
------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/