Typeof Operator - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Availability: ActionScript 1.0; Flash Player 6
Operands
variableName : Object
that you have defined, or interface name.
An identifier for a function parameter.
parameter
Example
Usage 1: The following example declares a public variable named
String and assigns an empty string to it:
var userName:String = "";
Usage 2: The following example shows how to specify a function's parameter type by defining
a function named
randomInt()
function randomInt(integer:Number):Number {
return Math.round(Math.random()*integer);
}
trace(randomInt(8));
Usage 3: The following example defines a function named
parameter named
val
type:
function squareRoot(val:Number):Number {
return Math.sqrt(val);
}
trace(squareRoot(121));
See also
,
var statement
function statement

typeof operator

typeof(expression)
Evaluates the
expression
MovieClip, Object, Function, Number,
Availability: ActionScript 1.0; Flash Player 5
Operands
expression : Object
190
ActionScript language elements
- An identifier for a variable.
functionName
that takes a parameter named
of the Number type and returns the square root of
and returns a string specifying whether the expression is a
- A string, movie clip, button, object, or function.
A native data type, class name
type
An identifier for a function.
userName
integer
squareRoot()
or
value.
Boolean
whose type is
of type Number:
that takes a
, also a Number
val
String,

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF