# Button event handler newb question

**URL:** <https://forum.kirupa.com/t/button-event-handler-newb-question/155419>\
**Category:** Uncategorized\
**Created:** [July 17, 2005, 3:38pm UTC](https://forum.kirupa.com/t/button-event-handler-newb-question/155419 "2005-07-17T15:38:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![markdesign](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@markdesign](https://forum.kirupa.com/u/markdesign)\
**Post date:** [July 17, 2005, 3:38pm UTC](https://forum.kirupa.com/t/button-event-handler-newb-question/155419/1 "2005-07-17T15:38:18Z")

</div>

Hi,

I am having a trouble with th basic understanding of button event handling

A very simple scenario is:

create a new file.  
create two layer named ACTIONS and Button.  
on the ACTIONS frame 1 add code:

myButton.onRelease = function() {  
trace(“myButton has been clicked”);  
}

on the Button layer in frame 5, drop in button instance with an instance name myButton.

now i am confused why this simple thing isnt working

without having to rely on using the older on(release) syntax on the button itself.

thanks for any help!

:book:

~mark
