1 Reply Latest reply on Oct 25, 2006 9:55 AM by John_Galt

    run function on component load / focus

    ljonny18 Level 1

      I want to run a function every time a component is opened / focused upon.
      at the moment I am running the function with the "creationComplete" property which works fine, although it only runs when the component is first created, whereas I want to run the function every time the component is opened and re-opened etc......

      is there some sort of event call or something that can make this possible.......

      any suggestions?

        • 1. Re: run function on component load / focus
          Something like this might work.

          Create the function you want to call:
          import mx.controls.Alert;
          private function doFocusStuff() : void

          On the component for which you want to run the function on focus set the property focusIn like:
          <mx:TextInput focusIn="doFocusStuff()" .../>