Skip to main content
Inspiring
May 1, 2007
Question

Reality Check: Flash CS3/AS3 Check Syntax

  • May 1, 2007
  • 27 replies
  • 2789 views
I need a quick reality check. I've finally started playing around in CS3/AS3 on my Mac. Whenever I click "check syntax" I get a very limited error response: specifically, I get actual syntactical errors (e.g., a missing brace or paren), but I get NO COMPILER ERRORS (e.g., use of an undefined method or property). These compiler errors trigger at runtime, but not having them during authoring makes coding and debugging unnecessarily difficult.

Is this really how it's supposed to work?

In Flash8/AS2, we had compile-checking right in the AS file. If I attempted to access an undefined method or property, the error-checker would catch that right away. No time-consuming compile was necessary to catch these obvious errors (see example below). But AS3 doesn't seem to be as clever.

Am I missing something?

Thanks much!

-------------EXAMPLE---------------
This topic has been closed for replies.

27 replies

Inspiring
May 8, 2007
Oh, I wouldn't close it! The more ruckus we raise the more likely we will get some attention. After all the squeaky wheel gets the grease. (Which is a saying I didn't have on my list, but is now #84!)

May 8, 2007
I had noticed this also and raised a thread today but I've closed it after Rothrock directed me towards this one
Will report as a bug also
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?
catid=194&threadid=1266106&forumid=15
Inspiring
May 7, 2007
In Actionscript 2 runtime errors didn't exist and compiling only checked that the code was well written, not that it was valid.

In actionscript 3 they added both, runtime checking and compile consistensy of code.

Also, in AS3 if a variable/function is not defined it doesn't exist, unless the class is set to be dynamic.

So, basically, they force you to code better.

Why the syntax checker doesn't show errors? Because it only checks coding syntax, not integrity.
Inspiring
May 7, 2007
Thanks for joining in. If you haven't done so, please take time to report this using the link above.
Inspiring
May 7, 2007
I just can't drop this, even if nobody else cares. :)

I just did some simple tests on a bunch of math I'm doing and it takes about 1/8th the time to do this under AS3 when compared to AS2! This has renewed my commitment to wanting to learn and us AS3.

And I found there were several errors in my class that showed up at compile time, but not when I tried a syntax check. It would really help me learn the ins and outs if there was syntax checking of AS3 code!
Participating Frequently
May 7, 2007
I must admit that i was amazed that your example did not produce errors. I think a lot of us have been using the f9 preview for a while and have gotten used to no compile time checking.
I`ve just made something which will not auto format because of errors but check syntax is ok and compiles ok, so there are many problems.
Inspiring
May 4, 2007
Well it will check it at publish/compile time, so all is not lost. Other than that I am still at a loss. I've passed this along to everybody I know. Please do go to the link and report it as a bug.
Inspiring
May 4, 2007
Just got to try Flash 9 with AS3 today and that was the first thing I noticed. Any news on this issue? I mean, the lack of decent Syntax Check is a major headache and bound to lessen productivity.
Inspiring
May 3, 2007
Dunno. Maybe if we created a new thread called "CS3/AS3 astonishingly broken!!!" ;o)
Inspiring
May 3, 2007
Still surprised that nobody is talking about this. It doesn't even require that you be making class files! This simple line on a timeline:

var myNum:Number;
myNum="A";

Doesn't produce an Syntax Check error when the publish setting is set to AS3. But it does (as it should) when set to AS2. That is insane.

PS: Isn't anybody else interested or concerned about this at all?
Inspiring
May 3, 2007
Thanks for the link. I'm still completely surprised that nobody else is talking about this.