3 Replies Latest reply on Feb 27, 2009 1:22 AM by marcink

    problem with States


      in my app i would like to code something what you see in the code.

      but this is not possible, because now i have two buttons with the id 1.
      what is the best way to solve this? especially when you have lots of buttons? i mean, i need the id when i want to remove the child...

        • 1. Re: problem with States
          Gregory Lafrance Level 6
          I think you have to rethink your states. You are trying to add the same button in two states, which should not be necessary. You can base one state on another state, specifically.

          Also, you can't use numbers as identifiers.
          • 2. problem with States
            marcink Level 1
            my example is quite abstract. so the code is not working, of course...

            but yes, i try to add the same btn in more then on state. - so this is not possibel?

            when i can't add the same btn twice, i have to use one button in two states, and change its properties and styles...
            but how do i change the eventhandler?

            • 3. Re: problem with States
              marcink Level 1
              ok, thanks to google book search :) i found out that i didn't completely understand the concepts behind flex states...

              @greg: thanks, you were right :)