moock.org is supported in part by


August 26, 2003

a taste of actionscript 2.0

i thought i'd whip up a quick'n'dirty code sample to show you all what as2 feels like. things to note:

-strict typing. datatypes are specified after a colon (e.g., propName:datatype = value)..unlike java, which specifies types first (e.g., datatype propname = value)
-automatic 'this' resolution. you don't have to explicitly use 'this' to refer to instance and class properties
-a REAL class statement!!!
-access control modifiers (public, private, but no protected)
-use "var" in a class to create properties
-it all compiles down to AS1 (yes, prototype) so you can run it in flash player 6 (that's why i said prototype was "almost" dead yesterday)
-class code must appear in an external .as file, not on a frame, button or clip
enjoy! lots more to come!


Posted by moock at August 26, 2003 04:52 PM
Comments

Hi,
I'm trying to extend the Color class to add functionality, but it isn't working. The problem is that I can't obtain the rgb color value from the myColor instance. Can this be done? Any ideas?

Thanx!

Jabbit

Code:
--------------------------------------------
in the score:
--------------------------------------------
var myColor:MyColor = new MyColor();
myColor.setRGB(0xEF0000);
trace("mycolor: " + myColor.toRGBString());
--------------------------------------------


--------------------------------------------
in the "MyColor.as" file:
--------------------------------------------
class MyColor extends Color {
public function toRGBString():String {
var val:Number = this.getRGB();
var rVal:Number = (val & 0xFF0000) >> 16;
var gVal:Number = (val & 0x00FF00) >> 8;
var bVal:Number = val & 0x0000FF;
return "r: "+rVal+" g: "+ gVal + " b: " + bVal;
}
}
--------------------------------------------

Posted by: Jabbit at October 31, 2003 03:15 PM

can we make a file attachment UI component using flashMX?

Posted by: Balakrishnan at October 27, 2003 02:58 AM

Damnit! I just learned Flash MX and that was a pain in the ass because the crappy examples on the web are all using Flash 3, 4, and 5 syntax.

Now it's AS 2.0 and that's different from Flash MX! Ok, well, it IS more like Java and PHP5 and well, every other OOP language, so I'm glad we have AS2.

Collin, my newly-bought, and heavily used ActionScript for Flash MX is already out-of-date. Make me a new book please. I'll pay you for it too. Damn, you got a good scam going. What, you gonna push AS3 after I buy your next book ;-)? Yeah, I'm grabbing for my ankles, give it to me Macromedia.

Dante

Posted by: Dante at October 25, 2003 05:21 AM

A question about the departure from prototype: I have some libraries which depend on adding functionality to the Array and Math classes by popping in functions, e.g:

Math.prototype.roundSD = function(){
// return significantDigit rounding
}

And so on. But 2.0 does not seem to recognize these additions... this could be rather problematic, and certain apps (Math apps) depend rather heavily on these extensions. How can these decorations be remodeled for the classes of 2.0?

Posted by: Tim Summers at October 23, 2003 05:17 PM

and yes, it's supposed to be function Buddha() { ... } ( a previous incarnation...)

Posted by: denis at October 7, 2003 08:40 PM

/*
Can anyone help me? My function respond() { pa[0] = pb[0]; } uses pb as a pointer to move the contents of array element b[0] to array element a[0] using pointer pa; is there any way using actionscript to replace arrays a and b with variables yet maintain the ability to use pointers as done here, so that function respond() { pa=pb;} works? In other words, can I store the reference to a variable and use it in an assignment statement to access its value? Probably a dumb question, but maybe I can stop thrashing my cortex if I can be convinced it's not possible.
*/
class Buddha {
var a:Array;
var b:Array;
var pa:Array; //points to array a
var pb:Array; //points to array b
function Buddha (n:String, l:Number) {
a=new Array(0,0);
b=new Array(0,0);
pa=a;
pb=b;
}
function respond() {
pa[0]=pb[0];
trace (a);
}
}
/* frame 1 actions:
me=new Buddha();
for (i=0; i<10; i++) {
me.b[0]=i;
me.respond();
}
stop();
*/

Posted by: denis at October 7, 2003 08:18 PM

"The interface stays the same while the implementation changes. Its the same either way."

No its not. If you use interfaces your implementation can change but it cannot change from function to variable. I'd say that's an issue.

- ECMAScript edition 4 supports get/set

- Actionscript 2 supports get/set

- C# supports get/set

- Eiffel supports get (functions with no parameterization can be invoked using variable syntax)

I rest my case. (But your formal argument style is really convincing, I must say:)

Posted by: Bent Rasmussen at October 6, 2003 09:40 AM

I have problems with this:
unescape -
-Function; evaluates the parameter x as a string, decodes the string from URL-encoded format (converting all hexadecimal sequences to ASCII characters), and returns the string. -
it works in Flash 5, but I could not manage to make it working in 6. What can I do?

Posted by: Jan at September 24, 2003 06:36 AM

Will you AS jerkoffs stop complaining about no protected access. are you insane?

Public and private are plenty, 99 percent of you dont even understand protected access (eg in java)

There is no difference between get Variable and getVariable. In fact, use of built in getters is stupid and leads to bad class/interface design - and is used by all kind of hokey "write the code for you" crap. The interface stays the same while the implementation changes. Its the same either way.

Posted by: Wallace at September 22, 2003 04:46 PM

"there's no particular advantage to using the built-in getter/setters (like get height()) over traditional "accessor methods" (like getHeight()). it's a matter of personal taste."

Its not a matter of personal taste at all. Its a matter of robustness. Say you have a Point class. If you want to switch to polar representation, you could if you used the new "get/set" keyword. Eiffel supports accessing methods as if they were variables for the same reason -- the syntactic transparency is the means that allows one to change representation; in Eiffel this syntactic transparency is termed the Uniform Access principle. (I prefer the new syntax, both on aesthetic grounds and on semantic grounds.)

Posted by: Bent Rasmussen at September 18, 2003 10:40 AM

bmsv, you don't have to use this._myprivatevar anymore, just use _myprivatevar.

Posted by: Arthur Clemens at September 14, 2003 11:20 AM

help me my site is crap

Posted by: Spider at September 11, 2003 11:08 PM

I will answer myself, the private modifier works, I just had to define the type of my instance:
person:Person = new Person("borja", 21);

Posted by: bmsv at September 11, 2003 01:41 PM

does the modifier 'private' really work?
I have the following class:
class Person
{
private var _age : Number;
private var _personName : String;

public function Person(personName:String, age:Number)
{
this._personName = personName;
this._age = age;
}

public function getAge() : Number
{
return this._age;
}
public function getName() : String
{
return this._personName;
}
}

and that code in the movie:
import Person

person = new Person("borja", 21);
person._age++;
trace(person.getAge());
trace(person.getName());
trace(person._age);

I can modify the value of a field in a direct way, something that shouldnt be allowed :(

Posted by: bmsv at September 11, 2003 07:36 AM

first of all
Thanks for this beautiful piece of code

being a flash programmer for the past 2 years, this is the first major change in Actionscript that i dreamt of.

special thanks to colin moock for this beautiful piece of code which reminds me of my days in java.

and finally thumbs up to macromedia for their beautiful work

Posted by: chetan at September 10, 2003 02:18 AM

Collin, you'll have to write a book, soon...

Posted by: svm at September 9, 2003 02:14 AM

Are .swc files equivalent to Java's .class files? Will they be linked together with .swf at runtime?

Posted by: Pavel Simek at September 8, 2003 08:44 PM

replies, answering from the bottom up...

vinny:
there's still no way to access the file system in 2004. local data is still stored in sharedobjects.

yudi:
you're right, in many languages, strict typing does in fact improve runtime performance. however, that's not the case for flash player 7.

several folks:
the main benefit of strict typing is: it helps catch errors in your code. strict typing guarantees that you've followed your own oop architectural plan. once a program type checks, it usually works. also, the as2 syntax is way more intuitive for oop programmers. a very minor side-effect is code-completion.

See4th: strict typing is not mandatory. i don't actually know of any authors yet. keep an eye out on this blog for news about my own projects and other projects.

andy: #include has not disappeared. you can use it like you always have. the new "import" is a totally different statement. it's just a convenience that lets you use "Box" when you mean "org.moock.Box". jeremy's description is correct. each class is added to the .swf only once. and yes, wildcards are supported (e.g., import foo.*)

alex: the official name is indeed "ActionScript 2.0"

noname: methods cannot be declared in one file and implemented in another :(

pavel: all as2 classes must be written in external .as files. you can't create an as2 class on the timeline or on a button or movieclip.

leon: ya, i wish they had done protected too. and yes, polymorphism will work the way you described it with your Shape example. as2 classes can be loaded at runtime, but in order to use them in another document at author time, you need a "stub-definition" of the classes you'll use at runtime. the stubs are called intrinsic class definitions. you can create your own if you like, or you can hack a component to do it for you (it's kinda ugly, but it works).

Posted by: colin at September 8, 2003 06:56 PM

Virtual members, abstract classes / interfaces and polymorphism
======================================================================

extending the Canvas/Shape example suggested below, imagine this,

(abstract) class Shape{
public virtual function Draw(clip:MovieClip) : Void;
}
class Circle extends Shape{
public function Circle(x:Number,y:Number,r:Number) : Void{
// assign protecte.. er private members
}
public function Draw(clip:MovieClip) : Void{
clip.drawEllipse(x,y,r);
}
}
class Canvas{
var parent:MovieClip;
public function DrawShape( theShape:Shape ){
theShape.Draw(parent);
}
}
var circ:Shape = new Circle(100,100,100);
var c:Canvas = new Canvas();
c.DrawShape(circ);

Point 2
==========

where will the classes be loaded and what will their scope be? obviously if you define a subclass within a MC you load in later, the compiler/player can't tell what definitions will be included in the clip, so does this mean the type will only be available to that clip and its descendants? or will you be able to load a library clip with all your data type hierarchy?

I ask since although it purports to be strongly typed it must also be loosely coupled if class definitions could be loaded in dynamically via MCs at runtime. Does this also mean that we'd have to be extremely careful to ensure all our types are loaded in at the root in the forst instance?

questions.. questions...

Still not sure about the code-bloat that's likely to be generated from compiling this juicier syntax all back down to AS1 bytecode. won't that also make the code much slower than if we had native type resolution in the runtime?

Posted by: Leon J at September 8, 2003 07:29 AM

Inheritance. Given that AS2 compiles to AS1, will we really see inheritance implemented properly? If not, is that why there's no protected modifier? if so, will we get true polymorphism via runtime types vs compile-time types? I suspect not if the language is going to be AS1 byte-code, since the overhead's gonna not be worth the juicy syntax.

will I be able to say:

var myShape:Shape = new Rectangle(w,h);
and pass any Shape object into a (say) Canvas class's method for drawing shapes?

I'm concerned that without a protected modifier you'll see a lot of properties made public that really shouldn't be - internal url's, crypto seeds etc.

My 50 pence.

Posted by: Leon J at September 8, 2003 07:10 AM

Isn't the automatic "this" resolution one of the reasons to make AS2 classes obligatory external? In AS1 any unqualified identifier is scoped to the timeline according to where the code is written. Therefore you must use "this" in any reference to the class members. Now any unqualified identifier may be considered to have class scope (as if they had "this" before them), since there is no timeline. I like it -- my code is going to be distinctly shorter without all those "this". :)

Posted by: Pavel Simek at September 6, 2003 06:51 PM

Collin you better write me a new 'actionscript for flash MX' book!:p

Posted by: thimon at September 6, 2003 09:22 AM

can the class methods be declared in one file and implemented in another? similar to *.h and *.cpp files when using classes in c++? or does ecma v.4 have a better way to do this? personally, for large classes I prefer to have declerations in one file and implementations in another.

Posted by: at September 6, 2003 12:58 AM

thnx guys, that helped a lot !

Posted by: Snypa|2 at September 5, 2003 11:24 PM

Synpal2...to put it simply, access control allows the developer to dictate what other developers have access to from a programming standpoint. Basically, declaring a property as private means that only that class can access the property.

Take component development for example. Let's say you had some setting for color. You would have to create a property to store that value, but you may not want someone using the component to have direct access to the property. Maybe you want them to use a method to set it in which the methid converts the color to the nearest websafe color. Prior to access control, there is no real way to do this. You can name the property something obscure, but there really isn't anything that completely hides it. With AS2, setting the property as "private" will allow the class to have access to it, but nothing outside of the class. Basically, your code can read/write it, but someone using your code essentially can't see it at all. This would then force the developer to use the method that sets the method (this is called an accessor method).

Hope that helps.

Posted by: Jeremy at September 5, 2003 10:19 AM

Snypa|2> AS2 isn't about a set of new classes to use, it's about a much better syntax for creating your own classes.

For anyone who doesn't know Java or C# and is confused about public/private classes, getters/setters, etc, you can easily learn the basics at java.sun.com/docs/books/tutorial/java/

People complaining about the :datatype syntax should check out Colin's comment here (Aug27, 5PM).

Posted by: Peter Rust at September 4, 2003 11:51 PM

And lastly, what other class types are there in AS 2.0, other than the "box class" ? Could someone plz list them plz. I just want to know what Im getting into :D

Posted by: Snypa|2 at September 4, 2003 05:19 AM

As for my last question (i figured it out), I just re-read your coding and realized that the extra coding was basically a movieclip that is ActionScripting to draw lines, now Im assuming that the AS 2.0 is there for organizing the coding into classes, kinda like XML in a way with xml nodes.

But anyways, can anyone fill me in about this:
"access control modifiers (public, private, but no protected)"Like what is it specifically for, so people cant access the .as file or what is it for ? Whats the difference between public & private ?

Posted by: Snypa|2 at September 4, 2003 05:16 AM

alex, yes it is, basically AS adds more programmability & control over data classes, thats what Ive gathered from what I've seen. Would anyone like to add to this ? Im sure there must be more uses with AS 2.0 than meets the eye, I personally want to buy that MM AS 2.0 dictionary which is set to come out quite soon, aswell as Colin's AS 2.0 book :)

Posted by: Snypa|2 at September 4, 2003 02:59 AM

1 question, but what does that coding specifically do, from what Im seeing, is it like creating a vector box with a movieclip inside of it ? Or like explain the use or advantage coding this way, or is just a more of a advanced way to movieclips as containers ?

Posted by: Snypa at September 4, 2003 02:45 AM

Great improvement but why, WHY the :datatype!!??Have to still be different I guess, oh well, cant wait to use it.

Posted by: J stnfck at September 3, 2003 10:31 PM

The advantage of inports over includes is that eliminates the need to make sure that you don't double-include code in you file. For example, lets say that you use a component that #include some code and you also happed to #include the same code, it would then be in your file twice (or worse yet, there may be a name conflict). Imports resolves this problem by making sure that the code is added only once.

Imports are replacing #include (although I believe you can still use them). You need to understand what it is that imports do and I think it will make a lot of sense.

Imports basically allow a shortcut to the class that you are using. For example, lets say you have this package "org.moock.mypackage". And in that package you have two classes: org.moock.mypackage.Class1 and org.moock.mypackage.Class2.

Your classes would then have to be in this directory path:

org > moock > mypackage > Class1.as
org > moock > mypackage > Class2.as

There are two ways to access those classes. 1) by saying:

myClass1 = new org.moock.mypackage.Class1();
myClass2 = new org.moock.mypackage.Class2();

or 2)

import org.moock.mypackage.Class1
import org.moock.mypackage.Class2
...
myClass1 = new Class1();
myClass2 = new Class2();

Here, the import has basically made a "shortcut" to the 2 classes so that you don't have to type the whole path.

As far as the code being added to the .swf, the compiler *should* figure out what classes are used and only inlcude the ones that are needed in the compiled file. So if you only use org.moock.mypackage.Class2, Class1 should not be included even if you import it.

I am also not sure about the .* import. So like:

import org.moock.mypackage.*

instead of:

import org.moock.mypackage.Class1
import org.moock.mypackage.Class2

Posted by: Jeremy at September 3, 2003 05:49 PM

ActionScript 2.0...
is this official name?

Posted by: Alex at September 3, 2003 03:19 PM

As a developer only a few years young, if it's an improvement in any way - bring it on!

Posted by: Jomo at September 3, 2003 10:52 AM

Just read about the disappearance of #include and have a query...

If we have several flash files in the same directory and also lots of external .as files used by these in the same directory, will each flash file read ALL of the .as files even though it may only use 1 or 2 of them? This would suggest if true that every flash file would need it's own folder on the server! I cannot believe that this is right therefore can someone explain a little more on how this will work please :)

Posted by: Andy at September 3, 2003 06:59 AM

Will strict typing be mandatory?

I am a home grown coder who adapted from Flash 4 to 5 to MX and was able to do so at my own pace.

Since I do not have a formal Java or VB background, I have learned everything from the 30+ flash books on my shelf (including the siren salamander)!

Colon, how soon can I get your book (I don't think it's a great leap to assume it'll be rolling off the presses anyday)?

What additional as2 authors would you recommend?

Thanks,

Jeff

Posted by: See4th at September 3, 2003 12:03 AM

As colin said, use of the colon notation for type annotation is a part of ECMAScript standard. Property accessors get and set are proposed features/keywords in ECMAScript 4. I think AS will have to implement them in future versions if not in AS 2.0 yet.

Posted by: douglas at September 2, 2003 10:26 PM

The first line was quoting a previous comment...oops

Posted by: Jeremy at September 2, 2003 07:02 PM

i dont see the point of actionscript 2 if it ends up compiling down to actionscript 1...

It compiles down to the same byte-code as AS2. But that IS what a coding language is...a human readable way to make computers do things. Basically, AS2 is, as stated, a language change not a byte-code change.

However, because there is no bytecode change, strict-typing really won't result in more improvement because there isn't actual primitive types (integer, float, string, etc.). From what I have seen, it looks like there is a pretty cool system for creating custom "primitive" data types that are actually AS classes that implement certain methods for validation. Ollowing this assumption, it looks like we will then be able to code our own data-types.

So really, the benefit of strict-typing is compile-time compatibility and to make methods that restrict what data can be passed to them. So now we can say that a method will only accept an Integer and we no longer have to test to make sure that it is an Integer (the compiler does that for us).

Posted by: Jeremy at September 2, 2003 07:00 PM

Anyone have any ideas as to why they would do this..?

private var myVariable:String

instead of

private String myVariable

Posted by: oscar at September 2, 2003 02:15 PM

Ok, so I don't really like ActionScript for flash 4.
Strong typing is something that is actually very useful, as it allows you to catch bugs much more easily than loosely-typed languages.

It may seem like a hassle to type your variables, but it can really help by catching problems before the program even runs. It also might let the code completion actually help the data input process (as opposed to just being annoying as it is now). If the program can pickup on your method definitions and pop up a list of methods you've just added to your class, it can really help.
Maybe I'm just used to how Visual Studio .net works with its advanced code completion, but I would like to see how 2004 compares.

Posted by: gfx at August 31, 2003 01:25 PM

What about filesystem interactions support in AS2. Are their classes that let you create objects that handle file uploads or does Flash Professional 2004 provide components that can manage files and directories. Although macromedia positions Flash professional as a tool to build serious business applications I can not find any information about essential features directed at filesystem interactions at macromedia.com

Posted by: vinny timmermans at August 31, 2003 06:51 AM

1. I think data classifing is meant for better runtime performance, like in C or java.
2. Putting classes outside is probably to resemble the C or Java structure, and maybe use predefined classes, extending them (?)
3. I got used to the advantages in Flash 5 (over flash 4). Though my most elaborated project was in flash 4, before F5 appeared (www.yudi.net/demo). But it was a headache.

So I only hope the as2 will justify itself...

Posted by: Yudi at August 30, 2003 04:11 PM

I prefer the version of actionscript that was in flash 4. Are we supposed to call that ActionScript 0 or .05 or what?

I'll just call it the tellTarget version.

Posted by: gfx at August 30, 2003 04:57 AM

Yeah I agree with Rob... what will be the use when it will be compiled the same way as AS1, since 90% of the Flash-users prefer AS1...

Posted by: SaphuA at August 29, 2003 02:33 PM

i dont see the point of actionscript 2 if it ends up compiling down to actionscript 1...

Posted by: rob at August 29, 2003 12:03 PM

can anyone explain to me the benefits of strict data typing? One reviewer suggested this would be beneficial due to more relevant code-hints, but I don't use them and I'm guessing that most advanced users don't either. For ongoing projects, if I want to utilise some of the benefits of MX 2004 am I going to have to change all my code to comply with the new standards for data?

Posted by: toby at August 29, 2003 11:48 AM

gil: i believe the requirement to keep all classes in external files was needed in order to add compile-time static type checking. if you had classes being defined, say, on a button click, then they wouldn't be available before that button click, and the compiler wouldn't be able to type check against them. if as2 were dynamically typed (runtime type checking) then they may have been able to allow classes to be defined anywhere. also, yes, you have to define component classes in external files.

aj: there's no particular advantage to using the built-in getter/setters (like get height()) over traditional "accessor methods" (like getHeight()). it's a matter of personal taste. if you want to give end-users property-style access to values, then you'll use the getter/setters. if you don't mind forcing end users to use methods to retrieve or set all values, then you'll use accessors. personally (not that it matters) i prefer accessors.

Posted by: colin at August 29, 2003 10:19 AM

Gil, If I was to guess why all the classes had to be in external .as files, it would be that is has to do with the fact that #includes are no longer in use. Since the Flash project is now aware of external .as files, perhaps Macromedia was able to improve their compiler to detect class dependencies at compile time and throw a compile error if a class is referenced that is not included in one of the project ActionScript files. In AS1, the compiler never would try to resolve these dependencies, but now with strict typing, I hope they felt the need to include this. Colin, do you know if that is the case?

I also have a question on the "native" use of accessors and mutators in AS2. What is the advantage of defining a native accessor as in your example:

public function get height ():Number {
return height_internal;
}

versus writing a method which is simply named as an accessor:

public function getHeight ():Number {
return height_internal;
}

Does this change the calling syntax in a beneficial way?

Posted by: AJ Canepa at August 28, 2003 03:04 PM

I'm wondering what the advantage is of forcing all Classes to be written in external .as files.

I can see the obvious logic, in that it gives you an external library of classes to re-use across multiple projects, but it seems strange that you HAVE to keep them all external.

Does this also mean that any code for component classes must also be kept in external files?

Just curious.

Gil

Posted by: Gil at August 28, 2003 01:06 AM

mike: no flashdoc. ya, that's a real shame. :( but at least it wouldn't be too hard to write a util to do it. and as for "no cigar", let me know after three months of using 2004 whether you'd rather trade it back in for mx and actionscript 1. sometimes you have to look back at how far you've come rather than ahead at how far you still have to go.

mr. going blind: alright alright! i put the code sample in a textarea. geesh. you're lucky there's no script to sniff for sarcastic readers pal...you'd be on my banned list.

Posted by: colin at August 27, 2003 11:27 PM

ahmet,
yes, as2 has getters/setters but you can't have a property and a method with the same name. so the code looks like this:
public function get height ():Number {
return height_internal;
}

Posted by: colin at August 27, 2003 06:42 PM

1) as2 is always compiled down to as1, with a few new bytecodes when you export to fp7. it's basically an author-time wrapper on as1.

2) mm wasn't drunk when they used the colon type syntax, but the creators of ecma 4 may have been. i quote waldemar horwat, keeper of the ecma4 spec:

"[Why does JavaScript 2.0] use the colon notation for type annotation instead of copying the C-like syntax? Embarrassingly, this is a decision based purely on a historical standards committee vote this seemed like a good idea at one time. There is no technical reason for using this syntax, but it's too late to reverse it now (implementations using this syntax have already shipped), even though most of the people involved with it admit the syntax is a mistake."

from http://www.mozilla.org/js/language/evolvingJS.pdf

Posted by: colin at August 27, 2003 05:14 PM

Is it always compiled down to AS1 or is it only when we publish for player 6 ?

Posted by: stef at August 27, 2003 03:16 PM

Would be nice if AS2 would be more Java like... the datatype asigning sucks a bit, were they drunken while they implemented this weird stuff?

private var myVariable:String

instead of

private String myVariable

... just my 0.02$

Posted by: Roland Schaer at August 27, 2003 02:05 PM

They say it looks more like JAVA...
They issue a Pro version that is supposed to get in Visual Basic developers....
They finally (thankfully!) put in data typing...
and then they make it look like PASCAL!
Is this due to a strange will to uniqueness?

Posted by: Stephan Bezoen at August 27, 2003 10:50 AM

Hi Colin,

Does AS 2.0 support get and set accessors (as in C#, JScript .NET)?
Can we write like this:

function get Width() : Number {
return width;
}

So that private field is exposed as a public property?

Posted by: Ahmet Zorlu at August 27, 2003 10:20 AM

Can you plz suggest any books meanwhile to get fimiliar with this kinda coding practice.
Seems lot different from AS1 and I guess non programmers flashers will take quite some time to adapt to this.

Posted by: Abhishek at August 27, 2003 01:06 AM

All of this is great, but the fact that there is no method overloading shows that we won't be dealing with a "true" strongly typed language. Overloading is a key to creating reusable classes.

close and a good step foward, but no cigar... If Macromedia really want's to attract developers from Java & .Net (I'm making the assumption that Rich Clients are Macromedia's vision of Flash's future), they're going to have to cover all the basic needs of OOP.

By the way, will flashdoc be in there?

Posted by: Mike Joslyn at August 27, 2003 12:19 AM

Can you get the font smaller there.... point 6 is just barely readable, you should get it down to 4 or something to be truly useless

Posted by: Mr. Going blind at August 26, 2003 10:52 PM

Should mention usage.
saved as external file called Box.as
no #include just use:
var dabox:Box=new Box(200, 200,10, 10,_root,1)

Posted by: Joe at August 26, 2003 06:59 PM

Is strict typing going to be required for all code, or is it just that the option is now available? There are some situations where I've found ActionScript's dynamic typing to be quite useful.

Posted by: Moss Collum at August 26, 2003 06:40 PM

thanks...

Posted by: Nik Khilnani at August 26, 2003 05:08 PM

yes, overloading isn't supported.

Posted by: colin at August 26, 2003 05:06 PM

Geez that really tidies things up allot.

Posted by: urbian at August 26, 2003 05:05 PM

Any news on method/operator overloading?

nik

Posted by: Nik Khilnani at August 26, 2003 05:04 PM