MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference page 51

Actionscript language reference
Table of Contents

Advertisement

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
named
of the Number type and returns the square root of
val
function squareRoot(val:Number):Number {
return Math.sqrt(val);
}
trace(squareRoot(121));
See Also
,
.
var
function
that takes a parameter named
of type Number:
integer
that takes a parameter
squareRoot()
, also a Number type:
val
: (type)
51

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents