# Button Problem

**URL:** https://forum.kirupa.com/t/button-problem/222737
**Category:** Uncategorized
**Created:** [April 16, 2007, 5:27pm UTC](https://forum.kirupa.com/t/button-problem/222737 "2007-04-16T17:27:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![richarvey](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@richarvey](https://forum.kirupa.com/u/richarvey)
#### Post date: [April 16, 2007, 5:27pm UTC](https://forum.kirupa.com/t/button-problem/222737/1 "2007-04-16T17:27:13Z")

</div>

Hi guys,  
Got this problem using a link in a scrollpane component. I made a button, gave it an instant name, but for some reason it doesn’t work.  
Here’s the actionscript:

> diddy\_mc.onRelease = function() {  
> this.\_parent.gotoAndPlay(“diddy”);  
> }

And this’ the message I get whenever press on control/enter to play the movie:

> **Error** Symbol=scroll, layer=pDiddy, frame=1:Line 1: Statement must appear within on handler  
> diddy\_mc.onRelease = function() {

Can somebody please help! And how do I create this handler? What is a handler? Thanks in advance.

ric
