# Operator '=' must be followed by an operand - error!?

**URL:** <https://forum.kirupa.com/t/operator-must-be-followed-by-an-operand-error/217404>\
**Category:** flash\
**Created:** [February 26, 2007, 6:33pm UTC](https://forum.kirupa.com/t/operator-must-be-followed-by-an-operand-error/217404 "2007-02-26T18:33:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![call\_911](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@call\_911](https://forum.kirupa.com/u/call_911)\
**Post date:** [February 26, 2007, 6:33pm UTC](https://forum.kirupa.com/t/operator-must-be-followed-by-an-operand-error/217404/1 "2007-02-26T18:33:17Z")

</div>

Hello… I am using Flash 8, and I’m new to actionscript and Kirupa forums. =)

Problem: Everytime I try and test my mp3 player, I get these errors on output:

**Error C:\Documents and Settings\Admin\My Documents\Projects\gotoandlearn\mp3Player1\mp3Player.as: Line 49: Operator ‘=’ must be followed by an operand**  
**next.onRollOut = next.onReleaseOutside = ()**

**Error C:\Documents and Settings\Admin\My Documents\Projects\gotoandlearn\mp3Player1\mp3Player.as: Line 50: ‘)’ expected**  
**{**  
**Total ActionScript Errors: 2 Reported Errors: 2**  
**----------------**

Here’s the .as script:

**// Sound object**  
**var s:Sound = new Sound();**  
**s.onSoundComplete = playSong;**  
**s.setVolume(75);**  
**// Array of songs**  
**var sa:Array = new Array();**  
**// Currently playing song**  
**var cps:Number = -1;**  
**//Position of music**  
**var pos:Number;**

**// Load the songs XML**  
**var xml:XML = new XML();**  
**xml.ignoreWhite = true;**  
**xml.onLoad = function()**  
**{**  
**var nodes:Array = this.firstChild.childNodes;**  
**for(var i=0;i\<nodes.length;i++)**  
**{**  
_sa.push(nodes.attributes.url);_\*  
**}**  
**playSong();**  
**}**  
**xml.load(“songs.xml”);**  
**// Play the MP3 File**  
**function playSong():Void**  
**{**  
**s = new Sound();**  
**if(cps == sa.length - 1)**  
**{**  
**cps = 0;**  
**s.loadSound(sa[cps], true);**  
**}**  
**else**  
**{**  
**s.loadSound(sa[++cps], true);**  
**}**  
**playPause.gotoAndStop(“pause”);**  
**}**  
**//Pauses the music**  
**function pauseIt():Void**  
**{**  
**pos = s.position;**  
**s.stop();**  
**}**  
**//Pauses the music**  
**function unPauseIt():Void**  
**{**  
**s.start(pos/1000);**  
**}**  
**//Music Controls**  
**//Play/Pause Toggle**  
**playPause.onRollOver = function()**  
**{**  
**if(this.\_currentframe == 1)this.gotoAndStop(“pauseOver”);**  
**else this.gotoAndStop(“playOver”);**  
**}**  
**playPause.onRollOut = playPause.onReleaseOutside = function()**  
**{**  
**if(this.\_currentframe == 10) this.gotoAndStop(“pause”);**  
**else this.gotoAndStop(“play”);**  
**}**  
**playPause.onRelease = function()**  
**{**  
**if(this.\_currentframe == 10)**  
**{**  
**this.gotoAndStop(“playOver”);**  
**this.\_parent.pauseIt();**  
**}**  
**else**  
**{**  
**this.gotoAndStop (“pauseOver”);**  
**this.\_parent.unPauseIt();**  
**}**  
**}**  
**//Next Button**  
**next.onRollOver = function()**  
**{**  
**this.gotoAndStop(“nextOver”);**  
**}**  
**next.onRollOut = next.onReleaseOutside = function()**  
**{**  
**this.gotoAndStop(“next”);**  
**}**  
**next.onRelease = function()**  
**{**  
**this.\_parent.playSong();**  
**}**

If someone can point out my error, I’d appreciate it… Thanks.
