2 Replies Latest reply on Apr 9, 2009 2:19 PM by Brent Lamborn

    passing function to a custom component

    mickey3

      Hey so I have button that is in a custom component, say:

       

      <mx:HBox width="200" height="72" xmlns:mx="http://www.adobe.com/2006/mxml">

          <mx:Button width="72" height="72"  styleName="{buttonStyleName}"/>              

          <mx:Text text="{description}" width="100%" height="100%" textAlign="justify"/>
      </mx:HBox>

       

      And on another file i use it simply like this:

       

      <local:LabelComponent buttonStyleName="componentRssButton"  />                          

       

      However, I want the button on my custom component draggable, so I would like to pass a mouseMove handler but i could not find  a way to do that. Of course that easiest way is to have my whole custom component draggable like so:

       

      <local:LabelComponent mouseMove="componentRssButton"  />                

       

      but i want the button in the custom component the only one draggable.

       

      Thanks.