# Buttons & Functions

**URL:** <https://forum.kirupa.com/t/buttons-functions/199457>\
**Category:** flash\
**Created:** [September 2, 2006, 6:23pm UTC](https://forum.kirupa.com/t/buttons-functions/199457 "2006-09-02T18:23:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hyperion](https://avatars.discourse-cdn.com/v4/letter/h/4491bb/32.png) [@Hyperion](https://forum.kirupa.com/u/Hyperion)\
**Post date:** [September 2, 2006, 6:23pm UTC](https://forum.kirupa.com/t/buttons-functions/199457/1 "2006-09-02T18:23:32Z")

</div>

Hi,

I’m developing a simple Flash movie using movieclips as buttons and functions to control the interaction. My code looks like this, where “b1” is the instance name of the button:

b1.onRollOver = over;  
b1.onRollOut = out;  
b1.onRelease = onrelease;

function over () {  
this.gotoAndPlay(2);  
}

function out () {  
this.gotoAndPlay(7);  
}

function onrelease () {  
this.gotoAndPlay(20);  
}

The functions “over” and “out” works fine, but not “onrelease”. First of all, is this the correct syntax(“onrelease”)? If yes, why doesn’t the code work…?

Thanks!
