6 Replies Latest reply on May 6, 2010 7:07 AM by starmark02

    I can't get elements by ID from a mxml custom component =S

    starmark02

      Hi there,

       

           Im creating a mxml custom component, and I have another mxml components, I assigns the attribute ID to every component, but when I try to access to any component of those it return NULL, as the following;

       

      <mx:Panel xmlns:fx="http://ns.adobe.com/mxml/2009"
                xmlns:s="library://ns.adobe.com/flex/spark"
                xmlns:mx="library://ns.adobe.com/flex/mx">
          <fx:Script>
              <![CDATA[
                  import mx.controls.Alert;
                 
                  public function createUsersList ():void {

                          Alert.show(String(VB_USERS));                    // This return NULL, I dont know why
                  }    
              ]]>
          </fx:Script>
         
              <mx:VBox id="VB_USERS" width="100%" height="90%">
              </mx:VBox>
      </mx:Panel>