Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-17-2009, 07:04 PM   #1
chico83
Registered User
 
Join Date: Mar 2009
Posts: 4
Default [AS3] Syntax Error!

I'm having a slight problem with this piece of code. If anyone could help me out that would great. cheers!

1. 1084: Syntax error: expecting rightbrace before leftbrace.
2. 1083: Syntax error: else is unexpected.

ActionScript Code:
Power5.addEventListener(MouseEvent.CLICK, P5); function P5(Event:MouseEvent):void{     If (DirNotNorth = false) { Golf_Ball.y -=85 Golf_Ball.x -=(NewDir)     } else { Golf_Ball.y +=85 Golf_Ball.x -=(NewDir)     } }
chico83 is offline   Reply With Quote
Old 03-17-2009, 07:18 PM   #2
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

Howdy and Welcome...

ActionScript is case sensitive language... 'If' should be 'if'...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 03-17-2009, 07:24 PM   #3
chico83
Registered User
 
Join Date: Mar 2009
Posts: 4
Default

Oh yea, I was sitting there for hours trying to figure it out .

Thanks!
chico83 is offline   Reply With Quote
Old 03-17-2009, 07:26 PM   #4
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

Glad to help...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 03-18-2009, 09:58 AM   #5
m4r7in
Registered User
 
Join Date: Feb 2009
Posts: 3
Default

Also you have to compare with "==" not "="
m4r7in is offline   Reply With Quote
Old 03-18-2009, 10:41 AM   #6
kkbbcute
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by m4r7in View Post
Also you have to compare with "==" not "="
Darn, why didn't I spot it. The simple things always evade your notice.
  Reply With Quote
Old 03-18-2009, 03:22 PM   #7
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

Good catch, m4r7in...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
1084: Syntax error Petros34 ActionScript 3.0 6 05-15-2011 01:54 PM
1083: Syntax error: if is unexpected. saenzkovsky ActionScript 3.0 2 07-31-2008 03:44 PM
import command returning syntax error? bigalc ActionScript 2.0 1 06-26-2006 11:15 AM
syntax error on a function . . . why? SeanPaul72 ActionScript 2.0 2 03-26-2004 02:36 PM
Simple Syntax Error - maybe? iamrick ActionScript 2.0 4 03-24-2004 07:16 AM


All times are GMT. The time now is 06:32 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.