1 Reply Latest reply on Oct 12, 2008 8:12 PM by atta707

    Changing a Button to a UIComponent

    SiHoop Level 1
      I've been using the class below to serve as an item renderer to bring a button into a datagrid. I now want to make it more interactive by replacing the button with the MovieClipExample class that is a UIComponent that contains event handlers and an animation. My problem is that I cannot figure out how to bring the MovieClipExample class into the item renderer to replace the button. How should I do this?
        • 1. Re: Changing a Button to a UIComponent
          atta707 Level 2
          assuming MovieClipExample class file and the renderer MXML files are in the same project, in the same folder, add the following to the <mx:Canvas> line:


          or if the class is some other package use this notation:


          That would look like:

          <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml"

          Then for the button part, just do a:


          Hope this helps.