I'm a newbie with flash, what I'm trying to do is make the background scroll with my mouse...but this is giving me a syntax error...where is the error coming from?
var movieWidth:Number = stage.stageWidth;
menuWidth = nav1.width;
nav2.x = nav1.x + menuWidth;
addEventListener("enterFrame",frame_handler);
function frame_handler(e:Event) {
var a:Number = mouseX;
var b:Number = movieWidth/2;
var c:Number = 20;
var pos:Number= 0-((a-b)/20);
nav1.x += pos;
nav2.x += pos;
if (nav1.x >= 0 && nav1.x <= menuWidth)
{ nav2.x = nav1.x – menuWidth }
else if (nav1.x <= movieWidthmenuWidth)
{ nav2.x = nav1.x + menuWidth }
if (nav2.x <=movieWidth-menuWidth)
{ nav1.x = nav2.x + menuWidth }
else if (nav2.x>=0)
{ nav1.x = nav2.x- menuWidth }
}