1 Reply Latest reply on Dec 3, 2009 9:27 AM by anaping wan

    how cant I add a sprite to a IUIComponent

    jciglesias@uci.cu Level 1

      I'm doing some shapes with the class sprite and now I wan to add  that shape as a child of a component panel, but give me an error

      it's say that cant convert a sprite a to a IUIComponent,,



      how cant  I do that

        • 1. Re: how cant I add a sprite to a IUIComponent
          anaping wan Level 1

          <?xml version="1.0" encoding="utf-8"?>
          <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                xmlns:mx="library://ns.adobe.com/flex/halo"  >

             import com.wananping.MySparkSkin;
             import mx.core.UIComponent;
              private function init():void
                 var sp:Sprite=new Sprite();
              var ui:UIComponent=new UIComponent();
          <s:Group id="vb" width="400" height="300"  creationComplete="init()"/>
          <s:Button label="提交"  textAlign="center" height="30" skinClass="com.wananping.MySparkSkin" />


          My english is not good. I hope you can see.