# Statement must appear within on/onClipEvent handler

**URL:** https://forum.kirupa.com/t/statement-must-appear-within-on-onclipevent-handler/211210
**Category:** Uncategorized
**Created:** [December 28, 2006, 5:22pm UTC](https://forum.kirupa.com/t/statement-must-appear-within-on-onclipevent-handler/211210 "2006-12-28T17:22:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![DanontheMoon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/danonthemoon/32/7436_2.png) [@DanontheMoon](https://forum.kirupa.com/u/DanontheMoon)
#### Post date: [December 28, 2006, 5:22pm UTC](https://forum.kirupa.com/t/statement-must-appear-within-on-onclipevent-handler/211210/1 "2006-12-28T17:22:16Z")

</div>

Funny, in one swf this comes out as “this script contains no errors”.

In another swf, it’s endless “Statement must appear within on/onClipEvent handler” error messages. Anyone want to take a stab at as to why?

> this.onEnterFrame = function(){  
> this.\_parent.container\_mc.myTextFieldInstance.html = true;  
> if(rewind == true){  
> prevFrame();  
> }  
> }

this.onRollOver = function(){  
this.\_parent.attachMovie(“bigPeacock”,“this.\_parent.picbox\_mc”, 1);  
this.\_parent.container\_mc.myTextFieldInstance.text = “About Us, Contact us”;  
rewind = false;  
play();  
}

this.onRollOut = function(){  
this.\_parent.attachMovie(“clear”,“this.\_parent.picbox\_mc”, 1);  
rewind = true;  
\_parent.container\_mc.myTextFieldInstance.text = " "  
}

this.onRelease = function(){  
gotoandplay(50);  
}

stop();
