I'm in a basic flash class where we have to use AS2 and my teacher is out of school for the next week, can anyone help me figure out the syntax errors this code is throwing?
var startX:Number = flashMan_mc._x;
var startY:Number = flashMan_mc._y;
var endX:Number = 450;
var endY:Number = 300;
flashMan_mc.onEnterFrame = function()
{
if (flashMan_mc._x < endX && endY)
{
flashMan_mc._x += ((endX – startX)/30);
}
if (flashMan_mc._y < endX && endY)
{
flashMan_mc._y += ((endY – startY)/30);
}
}
Scene=Scene 1, layer=actions, frame=1, Line 10 ')' expected
Scene=Scene 1, layer=actions, frame=1, Line 14 ')' expected
Scene=Scene 1, layer=actions, frame=1, Line 15 Unexpected '}' encountered
Check for the '-' signs you have added on line 10 and 15. They are this '–' and not usual '-' signs.
Try deleting those signs and typing again.
var startX:Number = flashMan_mc._x;
var startY:Number = flashMan_mc._y;
var endX:Number = 450;
var endY:Number = 300;
flashMan_mc.onEnterFrame = function()
{
if (flashMan_mc._x < endX && endY)
{
flashMan_mc._x += ((endX - startX)/30);
}
if (flashMan_mc._y < endX && endY)
{
flashMan_mc._y += ((endY - startY)/30);
}
}