7 Replies Latest reply on Nov 4, 2010 2:46 PM by Claudiu Ursica

    Depth question

    learner_doug Level 1

      Trying to hide two buttons loaded in the main application (State1) from an component loaded in State3.  Is this possible?

       

      Thanks

        • 1. Re: Depth question
          Claudiu Ursica Level 4

          button1.visible.state3 = false;

          button1.includeInLayout.state3 = false;

           

           

           

          button2.visible.state3 = false;

          button2.includeInLayout.state3 = false;

           

          C

          • 2. Re: Depth question
            learner_doug Level 1

            Ah, I should have mentioned that I can't address the buttons in my component.  The component doesn't know

            about these buttons.  I believe that I get an "undefined" message or something like that.  The buttons do exist and work however.

             

            I have never heard of the displayInLayout.  What does that do?

             

            Thanks.

            • 3. Re: Depth question
              Claudiu Ursica Level 4

              Sorry it was includeInLayout, I guess I was thinking of something else when

              typing. How do your buttons get created?

              C

              1 person found this helpful
              • 4. Re: Depth question
                learner_doug Level 1

                The buttons are created in mxml like this:

                 

                <s:Button

                 

                 

                color="#FFFFFF" x="852" y="28" depth="55" label="Main Menu" id="menu_btn" visible="false" click="menu_btn_clickHandler(event)"/>

                 

                 

                 

                <s:Button color="#FFFFFF" x="930" y="28" depth="55" label="Milestones" id="processMap_btn" visible="false" click="textarea1_clickHandler(event)" />

                 

                 

                 

                • 5. Re: Depth question
                  Claudiu Ursica Level 4

                  Now I assume that in your parent component you have the states declared, like:

                   

                      <s:states>

                          <s:State name="state1"/>

                          <s:State name="state2"/>

                          <s:State name="state3"/>       

                      </s:states>

                   

                   

                  <s:Button visible.state3="false" includeInLayout.state3="false"  color="#FFFFFF"

                  x="852" y="28" depth="55" label="Main Menu"  id="menu_btn" visible="false"

                  click="menu_btn_clickHandler(event)"/>

                   

                  C

                  1 person found this helpful
                  • 6. Re: Depth question
                    learner_doug Level 1

                    Actually, I want them visible in State3, just not when I load a swf in State3, then I'd like them to be invisible. 

                     

                    I tried to load stuff on top of those buttons so that I wouldn't have to hide them, but they stay on top of everything that gets loaded from this component which is a comboBox that loads external swfs.  So I guess you could say that the comboBox is a component within a component. 

                     

                    I thought if I could address the buttons from the compnent, then I could visible=false until the user closes the swf. 

                     

                    Thanks for giving this a shot!

                     

                    • 7. Re: Depth question
                      Claudiu Ursica Level 4

                      Can you share some code I think this should be straightforward. And explain a

                      little bit more your usecase?

                      C