*implicit coercion of a value of type mx.core.IVisualElement to unrelated type Sphere.* :/
2011/9/21 Cédric Muller <[email protected]> > what if you do 'var s:Sphere = new Sphere() as IVisualElement' ?` > > > Apologies but I haven't done any Flex in a few years and I am getting back >> into it. >> >> I created a FLA and then created some visual assets in the Library, with >> Linkage names. I then published a SWC of these. >> >> In my Flex app project I linked the SWC with my project. Then I try to >> call >> the stuff up and place & I get an error: >> >> <fx:Script> >> <![CDATA[ >> private function init():void { >> var s:Sphere = new Sphere(); >> this.addElement(s); >> } >> ]]> >> </fx:Script> >> >> TypeError: Error #1034: Type Coercion failed: cannot convert >> Sphere@46b0179to mx.core.IVisualElement. >> >> ? >> ______________________________**_________________ >> Flashcoders mailing list >> [email protected].**com <[email protected]> >> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders> >> > > ______________________________**_________________ > Flashcoders mailing list > [email protected].**com <[email protected]> > http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders> > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

