5 Replies Latest reply on Oct 12, 2009 4:13 AM by jake_flex

    Is it possible to have private components inside a container?

    jake_flex Level 2



      I would like to hide some components inside a container, so that they could not be accessed from outisde. Same as declaring private variables in ActionScript. How can this be done in Flex?


      With the simple example component below, I would like the main app that uses this code to be only able to access the TextInput component via the function declared. Now, the TextInput can be accessed with both


      // a is instance of A


      <!-- Component A -->
           <mx:TextInput id="ti" text="hello world!"/>
                public function get text() : void
                     return ti.text;