1 Reply Latest reply on Mar 6, 2007 5:10 PM by ntsiii


    187_2007 Level 1
      How would I do this???

      I have a MXML file that has a component in it:

      <mx:Canvas visible="false" width="100%" height="100%" backgroundColor="#ffffff" id="canvasTab">

      When I load the MAIN.MXML file, the component is included and it runs as well.... When I click on a tree NODE from my MAIN.MXML file I would like to reload the component. In this case <m:TabMain>. Is there a way to do this?
        • 1. Re: components...reload?
          ntsiii Level 3
          You can't "reload" the component, but you can create a public method on the component that does whatever initializing functionality you want, and call that from your tree click handler.

          Provide an id on the component:
          <m:TabMain id="tm" />

          public function initComponent():void {
          //do whatever you need

          And in the clickHandler: