Oleg Andreev

speaking few languages about programming, interfaces, culture, maths and nature

ActionScript 2.0 nonsense

,

I have a bunch of old AS code (you know, function(){} instead of class{}, .prototype using and so on) and trying to compile it in Flash 8:

1) First frame: #include "cube.as" (BTW, there is no class named "cube" or "Cube")

2) Ctrl+Enter: ***Error*** ActionScript 2.0 class scripts may only define class or interface constructs.

3) Renaming cube.as into cube.as1

4) Doing #include "cube.as1"

5) Error message disappears!

ActionScript is still as stupid as it was in Flash 4. Much more powerful, but still stupid.

Ruby on Rails is not for the beginnersAutomated refactoring (idea only)

Comments

Anonymous Friday, March 28, 2008 7:15:35 PM

Tom writes: Maybe this error is because you use reserved name 'cube' or something like that.

Anonymous Sunday, April 20, 2008 11:56:49 PM

Anonymous writes: This error comes up without anything being reserved. He is right that Actionscript is still a bugged-pos language.

Anonymous Friday, March 6, 2009 8:12:47 PM

Anonymous writes: I think its because of cached-compiled code of of the previous cube.as file... by changing the name you're creating a whole new file.

Anonymous Monday, May 25, 2009 6:27:59 AM

Anonymous writes: stupid language in Java we write something like String myString; Simple like that In AS, we write var myString:String. I check other syntax, its just close to java, but use something unpleasant syntax. Its stupid?????? Dont understand, but dont want to learn this language at all, even its quite useful...

Anonymous Tuesday, June 9, 2009 2:06:35 PM

nochnoy writes: Use "Control/Delete ASO files" menu command. It's like browser's cache - sometime you need to do that in order to make things as they should be.

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies