title: function call on child object in adobe flex
body: <p>i have generated parent(label) object and it's child object(button) pragmatically with function named "addButton()" in adobe flex. now i want to call a function named "lable()" on  parent object and want to call function named "btn()" on child object. but on every click my script call same function "lable()". </p>
  
  <pre><code>   &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                 xmlns:s="library://ns.adobe.com/flex/spark"
                 xmlns:mx="library://ns.adobe.com/flex/mx"
                 minWidth="127" minHeight="34" backgroundColor="#F4E8E8"&gt;
      &lt;s:layout&gt;
          &lt;s:FormItemLayout/&gt;
      &lt;/s:layout&gt;
      &lt;fx:Declarations&gt;
          &lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt;
      &lt;/fx:Declarations&gt;
  
      &lt;fx:Script&gt;
          &lt;![CDATA[
              import spark.components.Button;
              import mx.controls.Alert;
  
              public function addButton():void {
  
                  //Child Object
                  var myButton:Button = new Button();
                  myButton.id = "dd";
                  myButton.label="X";
                  myButton.width = 20;
                  myButton.height = 20;   
                  myButton.depth =1;
                  myButton.x=105;
                  myButton.setStyle("color",'red');
                  myButton.addEventListener(MouseEvent.CLICK, btn);
  
                  //Parent Object
                  var lble:Label = new Label();
                  lble.width = 127;
                  lble.height = 34;
                  lble.depth =0;
                  lble.setStyle("backgroundColor",'red');
                  lble.addEventListener(MouseEvent.CLICK, lable);
                  lble.addChild(myButton);
                  myGroup.addElement(lble);
  
              }
  
              private function btn(e:Event):void {
                  jj.text = 'Text For Button';
              }
  
              private function lable(e:Event):void {
                  kk.text = "Text For Label";
              }
  
          ]]&gt; 
      &lt;/fx:Script&gt;
  
      &lt;s:HGroup id="myGroup"&gt;
          &lt;s:Button width="126" height="34" click="addButton();" label="Click" skinClass="spark.skins.spark.ButtonSkin"/&gt;
      &lt;/s:HGroup&gt;
  
      &lt;s:Label id="jj" x="14" y="150" width="1200" height="50" backgroundColor="gray" text="Button"/&gt;
      &lt;s:Label id="kk" x="14" y="69" width="1200" height="50" backgroundColor="gray" text="Label"/&gt;
  
  &lt;/s:Application&gt;
  </code></pre>
  
  <p>please help me</p>