# Simple button question

**URL:** <https://forum.kirupa.com/t/simple-button-question/312571>\
**Category:** Uncategorized\
**Created:** [August 7, 2010, 3:50am UTC](https://forum.kirupa.com/t/simple-button-question/312571 "2010-08-07T03:50:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jkz](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jkz](https://forum.kirupa.com/u/jkz)\
**Post date:** [August 7, 2010, 3:50am UTC](https://forum.kirupa.com/t/simple-button-question/312571/1 "2010-08-07T03:50:23Z")

</div>

Hi all

well I wanted to switch my project from keyboard controled to button(inside of flash) controled, meaning there is this mc that is controled by keyboard and I want it to be controled by the button I made. I hope you understand what I mean, sorry for my english:ducky:  
Now this mc has alot of code inside of it mainly if statements  
example

```auto
if (Key.isDown(right))...

```

now my problem is I thought if I replaced the _Key.isDown(right)_ with _mybutton.onPress_ or \*\_root.mybutton.onPress _would help_, \*but that of course didn’t work…  
any suggestions about this code? or is it that I’m completely off and should be changing some other part of the script I dont know I’m kinda lost here  
any help would be appreciated,thank you

EDIT: oh and its as1
