( Sorry, I posted without subject line in my previous mail )

Hello,

I ran into this problem which has been haunting me for about 3 hours now :s
Anyone with the solution to my possible very simple problem ?

How can I add an embedded png to my class which extends the HBox class ?
I'm going to use the class as a datagridcellrenderer.



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


// all kind of imports

public class Rating extends HBox implements IDropInListItemRenderer{
         // embed the solid star
      [Embed (source='assets/star.png')]
   private var Star:Class;
 
.....
 
   override protected function createChildren():void
   {   
     var s:Bitmap = new Star();
     addChild( s ); 
    // call the createChildren method of the superclass
    super.createChildren();
   }
.....
}


--
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




Reply via email to