Buttons test question... ( don't work )

Hi all,

i need to test 5 buttons (menu), after a “onresize” function, to move them correctly.

here my code :


stageListener.onResize = function() {
    if (btn1.onPress==true) {
        onPressBtn(220, btn1, 120, 1, 175);
    }
    if (btn2.onPress==true) {
        onPressBtn(350, btn2, 250, 2, 305);
    }

but it doesn’t work !!!

i try to put a variable when i press my button ( testPress=1 for btn1, testPress=2 for btn2, etc…). then, on my onResize function, i put this code:if (testPress=2) {onPressBtn(350, btn2, 250, 2, 305)};

but unfortunately, it doesn’t work too…

someone have an idea to help me ?