AS Sound and MC Movement Errors

Hey guys, need help yet again, I have a movieclip on the root timeline, in that movie clip are 3 more movieclips, each with instance names of tab1 and tab2 and tab3.

I have this code:

this.onRelease = function() {
	this._parent.tab2 = tab2
	this._parent.tab3 = tab3
	
	onClipEvent (enterFrame) {
		if (this._y != -17.0) {
			this._y = this_y + 1
		}
		else if (tab2._y = -17.0) {
			tab2._y = tab2._y + 1
		}
		else if (tab3._y = -17.0) {
			tab3._y = tab3._y + 1
		}
		else {
			tab1Sound = new Sound(this);
			tab1Sound.attachSound("enigmated");
			tab1Sound.start(0, 999999);

		}
	}
}
	

But when I preview, it gives me this error:

**Error** Symbol=soundbar_tabs_mc, layer=1, frame=1:Line 1: Statement must appear within on/onClipEvent handler
     this.onRelease = function() {

Can anyone tell me what’s wrong? Thanks :thumb: