Try changing it to 'IF BUTTON(3)==#UP'. Also remember 'BUTTON(3)' triggers once the key is let go. Might be the number of ANDs used.