Still same issue, with MovieClip:

TypeError: Error #1034: Type Coercion failed: cannot convert
flash.display::[EMAIL PROTECTED] to mx.core.IUIComponent.

This seems like something I've dealt with, months ago but I haven't touched
Flex for a while. Believe you must attach something that extends UIComponent
to Application, but if that's the case, this should be throwing a compile
error!

-Scott

On 11/19/06, Igor Costa <[EMAIL PROTECTED]> wrote:

you're trying to convert into a sprite that's can't possible.

just change to MovieClip instead of Sprite that's is deserved to create
more
common components.


Regards.

On 11/19/06, slangeberg <[EMAIL PROTECTED]> wrote:
>
> I'm trying to import a swf symbol into Flex 2. However, the following
code
> works great in AS3 project, but NOT in an MXML project:
>
>         [Embed(source="../Art.swf", symbol="car_blue")]
>         private var CarBlue:Class;
>
>         private function init():void
>         {
>             var car_blue:Sprite = new CarBlue();
>             addChild( car_blue );
>         }
>
> I get the following runtime error:
>
> TypeError: Error #1034: Type Coercion failed: cannot convert
> [EMAIL PROTECTED] to mx.core.UIComponent.
>     at FlexDerby/::init()
>     at FlexDerby/___Application1_creationComplete()
>     at
>
>
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction
> ()
>     at flash.events::EventDispatcher/dispatchEvent()
>     at mx.core::UIComponent/set initialized()
>     at mx.managers::LayoutManager/::doPhasedInstantiation()
>     at Function/http://adobe.com/AS3/2006/builtin::apply()
>     at mx.core::UIComponent/::callLaterDispatcher2()
>     at mx.core::UIComponent/::callLaterDispatcher()
>
> : : ) Scott
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>



--
----------------------------
Igor Costa
www.igorcosta.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




--

: : ) Scott
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to