# I'm kind of an idiot, please help

**URL:** <https://forum.kirupa.com/t/im-kind-of-an-idiot-please-help/206016>\
**Category:** Uncategorized\
**Created:** [November 4, 2006, 2:29am UTC](https://forum.kirupa.com/t/im-kind-of-an-idiot-please-help/206016 "2006-11-04T02:29:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shardican9](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@shardican9](https://forum.kirupa.com/u/shardican9)\
**Post date:** [November 4, 2006, 2:29am UTC](https://forum.kirupa.com/t/im-kind-of-an-idiot-please-help/206016/1 "2006-11-04T02:29:43Z")

</div>

I am still learning action script so please bare with me if my question is extremely easy to fix, but below is a code that I’m trying to use for a button, and below that is the error I keep getting when I check it. Can anyone explain to me what I’m forgetting to put in here and why?

AS

* * *

on (release) {  
}  
function(){  
if (\_root.currMovie == undefined) {  
\_root.currMovie = “contact”;  
this.\_parent.container.loadMovie(“contact.swf”);  
} else if (\_root.currMovie != “contact”) {  
if (this.\_parent.container.\_currentframe \>= this.\_parent.container.midframe) {  
\_root.currMovie = “contact”;  
this.\_parent.container.play();  
}  
}  
}

Error Message

* * *

**Error** Symbol=text\_stock, layer=text, frame=1:Line 3: Statement must appear within on handler  
function(){

Total ActionScript Errors: 1 Reported Errors: 1

Please help. Thank you, S
