a talk on AS3 functions

Default Values for Function Parameters
ActionSript 3 now allows you to specify default values for your function’s parameters. In doing so, that parameter then becomes optional and the default value assigned to the respective argument in the function call if a value is explicitly not provided.
You can only place parameters with default values after all required parameters.

function method(required:String, optional:String = “default”):void {
trace(required +” “+optional);
}
method(“Hello”); // “Hello default”


Calling Document Class functions from an imported class

the apply method

The Void

functions can return :void , :Number, :AnotherFunction

Leave a Reply