PDA

View Full Version : Statement must appear within on/onClipEvent handler



DanontheMoon
December 28th, 2006, 01:22 PM
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();

stringy
December 28th, 2006, 01:29 PM
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?
you have put the code on a clip rather than on its timeline

DanontheMoon
December 28th, 2006, 01:30 PM
Should I check my linkage, or perhaps change an instance name?

DanontheMoon
December 28th, 2006, 01:30 PM
Oh. Thanks, Stringy! You're the man. Happy New Year, BTW.

stringy
December 28th, 2006, 01:51 PM
Oh. Thanks, Stringy! You're the man. Happy New Year, BTW.

No problem - Happy New Year

DanontheMoon
December 28th, 2006, 02:29 PM
http://img126.imageshack.us/my.php?image=momse9.swf

Here's a preview of the site I'm making with this. It's for my Mom.