2 Replies Latest reply on Oct 15, 2011 2:14 PM by Shongrunden

    How to remove Button from Flex Mobile app actionbar with AS3?

    BryBam Level 1

      How exactly would i remove a Button from the actionBar "actionContent" in a flex mobile app?

       

       

      I tried these:

       

       

          this.stage.removeChild(menu_btn);

          this.removeChild(menu_btn);

          stage.removeChild(menu_btn);

          this.stage.removeElement(menu_btn);

          this.removeElement(menu_btn);

          stage.removeElement(menu_btn);

       

       

      I'm not having any luck with those. Im guessing where it is located in the actioncontent isn't considered the stage. Any ideas?

       

       

       

       

          <s:actionContent>

                              <s:CalloutButton id="menu_btn" icon="@Embed('assets/images/menu/menu_btn.png')" visible="false">

                                        <s:VGroup>

                                        <s:Button id="btn_one" label="Button" />

                                        </s:VGroup>

                              </s:CalloutButton>

                    </s:actionContent>

       

       

       

       

      The actionContent is setup like that, I know like with most mxml stuff I could give it an ID to reference it but im not sure how how to give the action content an id number `<s:actionContent id="testID">` does not work. So how can i access this to remove it? making it invisible isn't cutting it i need to actually remove it.