User Guide
210 ActionScript language elements
Availability: ActionScript 1.0; Flash Lite 2.0
Returns
String - The evaluated expression parameter, if provided.
Parameters
expression - A string, number, Boolean, array, or object to evaluate and return as a value of
the function. This parameter is optional.
Example
The following example uses the return statement inside the body of the sum() function to
return the added value of the three parameters. The next line of code calls
sum() and assigns
the returned value to the variable
newValue.
function sum(a:Number, b:Number, c:Number):Number {
return (a + b + c);
}
var newValue:Number = sum(4, 32, 78);
trace(newValue); // output: 114
See also
function statement
set statement
function set property(varName) {
// your statements here
}
Note: To use this keyword, you must specify ActionScript 2.0 and Flash Player 6 or later in
the Flash tab of your FLA file's Publish Settings dialog box. This keyword is supported only
when used in external script files, not in scripts written in the Actions panel.
Permits implicit setting of properties associated with objects based on classes you have defined
in external class files. Using implicit set methods lets you modify the value of an object's
property without accessing the property directly. Implicit get/set methods are syntactic
shorthand for the
Object.addProperty() method in ActionScript 1.
Availability: ActionScript 2.0; Flash Lite 2.0
Parameters
property:String - Word that refers to the property that set will access; this value must be
the same as the value used in the corresponding
get command.