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

**URL:** <https://forum.kirupa.com/t/buttons-test-question-dont-work/190437>\
**Category:** Uncategorized\
**Created:** [June 11, 2006, 9:17pm UTC](https://forum.kirupa.com/t/buttons-test-question-dont-work/190437 "2006-06-11T21:17:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![5TEF](https://avatars.discourse-cdn.com/v4/letter/5/85e7bf/32.png) [@5TEF](https://forum.kirupa.com/u/5TEF)\
**Post date:** [June 11, 2006, 9:17pm UTC](https://forum.kirupa.com/t/buttons-test-question-dont-work/190437/1 "2006-06-11T21:17:12Z")

</div>

Hi all,

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

here my code :

```auto

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 ?
