wyman
wyman

Reputation: 289

can't find syntax error

have anyone can tell me what syntax error on this actionscript (actionscript3.0)?

 var rotY: Number = (mouseY – (stage.stageHeight / 2)) / (stage.height / 2) * 400;

Thank for advance.

Upvotes: 0

Views: 384

Answers (2)

Diode
Diode

Reputation: 25165

Did you copy this statement from somewhere ? because in your statement

var rotY: Number = (mouseY – (stage.stageHeight / 2)) / (stage.height / 2) * 400;

minus symbol after mouseY is actullay dash , char code 8211

In @shanethehat's statement

var rotY:Number = (mouseY - (stage.stageHeight / 2)) / (stage.height / 2) * 400;

it is the correct minus symbol , char code 45

see : http://www.cs.sfu.ca/~ggbaker/reference/characters/#dash

Upvotes: 3

shanethehat
shanethehat

Reputation: 15580

Copy and paste this (or just type your line of code out again) and see if you still get an error:

var rotY:Number = (mouseY - (stage.stageHeight / 2)) / (stage.height / 2) * 400;

I couldn't figure out what it was, but it seems like one of the braces isn't really there in your code. I typed it out again and it compiled straight away.

Upvotes: 1

Related Questions