1084: Syntax error: expecting identifier befor rightparen.
Hi, friend!
I'm totally new to flash in general. I really need help! I've spent too long Google searching to try and find the answer to this. But I tried to use drag and drop but my code keeps coming up with this error Scene 25, Layer 'Layer_2', Frame 1, Line 7, Column 34 1084: Syntax error: expecting identifier before rightparen. here is the code that I use
var Drawing: Number = 1;
var LineSize: Number = 7;
var DrawColor: Number = 0xff15bb;
var Canvas_sp: Sprite = new Sprite = ();
this.addChild (Canvas_sp);
Canvas_sp.graphics.beginFill (0x00D9FF);
Canvas_sp.graphics.drawRect (0,0,500,400);
var Drawing_sh: Shape = new Shape ();
this.addChild (Drawing_sh);
Canvas_sp.addEventListener (MouseEvent.MOUSE_UP, MouseUp);
Canvas_sp.addEventListener (MouseEvent.MOUSE_DOWN, MouseDown);
Canvas_sp.addEventListener (MouseEvent.MOUSE_MOVE, MouseMove);
function MouseUp (e: MouseEvent): void
{
Drawing = 0;
}
function MouseDown (e: MouseEvent): void
{
var CanX: Number = Drawing_sh.mouseX;
var canY: Number = Drawing_sh.mouseY;
Drawing = 1;
Drawing_sh.graphics.lineStyle (LineSize, DrawColor);
Drawing_sh.graphics.moveTo (CanX, CanY);
}
function MouseMove (e: MouseEvent): void
{
var CanX: Number = Drawing_sh.mouseX;
var canY: Number = Drawing_sh.mouseY;
if (Drawing == 1)
{
Drawing_sh.graphics.lineTo (CanX, CanY);
}
}
PLEASE HELP!
