SWiSH Player Support
SWF5 or later - Supported Internally
Syntax
length(expression)
length(variable)
string.length
Arguments
expression: A string.
variable: The name of a variable containing a string.
Returns
length of the string defined by the expression or variable.
Description
String function: Returns the length of the specified string or variable name.
Sample
onLoad () {
s = "dude";
trace(length(s));
}
// returns the value 4
or,
onLoad () {
s = "dude";
trace(s.length);
}
// returns the value 4