PDA

View Full Version : Constructers



Sim085
October 23rd, 2004, 03:26 AM
Is there a way in ActionScript 2.0 to have more then one constructer?
I am creating some classes, however with one constructer it mesns that I have
to initilize my objects all in the same way :(

Is there a way how to have more then one constructer?

Thanks in advance for your replies.

Voetsjoeba
October 23rd, 2004, 05:16 AM
I don't think so. ActionScript has never and still doesn't support overloading, so I'm afraid you'll have to do a bunch of if's to check your arguments to do a manual overload.

Sim085
October 23rd, 2004, 06:37 AM
Ok, :( ... it's such a pitty :(

However I guess your solution is best :)

Thanks

Voetsjoeba
October 23rd, 2004, 07:13 AM
Yeah, annoying eh ? It'd be great if it supported overloading ...