I have a column of 10 or more buttons and when I drag one button over another, I would want the button to replace the one its over, and for the rest of the buttons to shunt up or down, depending on which direction (upwards or downwards) the dragged button is travelling.
Intersecting buttons are no problem but the amount of one button within another, i can't get to work (The buttons are only 6 or 7 pixels away from each other so I would want only the button with the most covered area to move, if you see what I mean, i.e a button could cover another button but also one below it for instance. If the first button has more "coverage" that's the one that shunts down out of the way for the dragged button to take its place. Don't know if I've explained this very clearly...
Anyhow, part of the code is:
Code: Select all
if intersect(button "ANIMATION", button "FIELDS") and item 2 of the location of me > tFieldsWherey -4 or item 2 of the location of the target < tFieldsWherey +4 then
---
end if
Can anyone help here please? (Can anyone understand what I'm going on about with my awful explanation
