Add Calls to jsRecordFlexAction

Lastly, add calls to jsRecordFlexAction in each of the component event handlers in the MXML (FlexAUT.mxml) file

You can copy this code from this page or download the source file here.

  <mx:Script>
    <![CDATA[
      import mx.collections.ArrayCollection;
      
      [Bindable]
      private var comboContent:ArrayCollection;
      
      private function onInit():void {
        comboContent = new ArrayCollection(['Value 1', 'Value 2', 'Value 3']);
      }     
      
      /* Functions triggered on UI component events*/
      private function onTestFlexComboChange():void {       
        this.TestFlexLabel.text = "Combo value changed to '" + this.TestFlexCombo.selectedLabel + "'";
        jsRecordFlexAction(this.id, "selectByLabel", "TestFlexCombo", this.TestFlexCombo.selectedLabel);
      }   
      private function onTestFlexButtonClick():void {
        this.TestFlexLabel.text = "Button clicked";
        jsRecordFlexAction(this.id, "clickButton", "TestFlexButton", null);
      }
      private function onTestFlexInputChange():void {
        this.TestFlexLabel.text = "Text input value set to '" + this.TestFlexInput.text + "'";
        jsRecordFlexAction(this.id, "setInputText", "TestFlexInput", this.TestFlexInput.text);

      }

    ]]>
  </mx:Script>