1 Reply Latest reply on Jul 25, 2007 12:00 PM by NickTheNameless

    deleting not working

    NickTheNameless
      below i've attached my partial code. i didn't include my entire code because it's 334 lines long. if i need to do that to get this solved though, i will... just let me know.

      in the for loop below, i assign 3 functions to a newly attached movie clip. one function for each of the three major button states (onRollOver, onRollOut, onRelease). i delete and reassign these functions by clicking a different movie clip (openGrid3 and closeGrid3). if i don't pass over the "item" movie clip, and then open grid3 (openGrid3), all works as expected. however, if i pass my mouse over the "item" movie clip, then open grid 3, none of the states get deleted. what am i doing wrong?

        • 1. deleting not working
          NickTheNameless Level 1
          i wanted to mark this as resolved, to preserve the integrity of these forums that i use and appreciate so much. i discovered my problem and the solution is below. looking back on this post now, i bet this made no sense to anyone, as i had diagnosed the symptoms incorrectly and this one really is hard to help without seeing the flash movie playing. here's the solution that fixed it for me though...

          first the problem did not occur because the user passed over the item. when openGrid3 ran, the item button states were deleted, but you'll also see that the action that ran the openGrid3 function was deleted. it was then changed to closeGrid3, however closeGrid3 did not delete itself and reassign openGrid3, so on the second pass around, none of the items had their button states deleted. i added these lines to the closeGrid3 and closeGrid4 functions....

          delete grid*.panelButton.onRelease;
          grid*.panelButton.onRelease = openGrid3; //* = which grid, 3 or 4