Flash Actionscript 2.0 implicit getter and setter function creater

If you can read this then you may not have the flash player installed, please go to the Macromedia website and download it (it is free).

This utility takes some of the leg work out of making actionscript 2.0 class files. It generates private variable declarations and public implicit getter and setter functions for those variables.

To use it enter variable names and datatypes separated by commas like this:

myVariable:myType,myOtherVariable:myType

It will then generate the variable declarations and the implicit getter and setter functions. Feel free to use and abuse this utility. If you want the .fla then you can get it here:

Download .fla

If you make and useful additions or modifications then please send it to info (at) cosnetics (dot) co (dot) uk it so that i can update this version.

Some notes:

A getter method must not take any parameters. A setter method must take exactly one required parameter. A setter method can have the same name as a getter method in the same scope. Getter/setter methods cannot have the same name as other properties.

Unlike ordinary methods, getter/setter methods are invoked without any parentheses or arguments.

Implicit getter and setter functions are syntactic shorthand for Object.addProperty() in actionscript 1


Home