1 Reply Latest reply on Mar 17, 2010 4:45 PM by kglad

    Why is it removing my button?


      I have a movieclip.. I have a button in that movieclip. When you press the button. The movieclip goes to frame 2, which doesn't have the button.


      Then after 5 seconds the tree goes back to frame 1, which has the button.. But the button no longer works.. why is this happening?



      I tried this before the 5 seconds:  trace(_root.TheMap.TreeCuts1.TreeBtn) -- and it said _level0.TheMap.TreeCuts1.TreeBtn


      I tried this after the 5 seconds: trace(_root.TheMap.TreeCuts1.TreeBtn) -- and it said Undefined



      Please tell me how to fix this.

        • 1. Re: Why is it removing my button?
          kglad Adobe Community Professional & MVP

          because the button didn't exist, flash disassociates the code from the (non-existant) button.


          to remedy, either redefine your button handlers when the button exists again, or don't remove your button.  for the latter, you can assign your button's _visible property to false so it appears to not exist and then re-assign to true when you want your button to reappear.