03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

int function<br />

int(value) : Number<br />

Deprecated since Flash Player 5. This function was deprecated in favor of Math.round().<br />

Converts a decimal number to an integer value by truncating the decimal value. This function<br />

is equivalent to Math.floor() if the value parameter is positive <strong>and</strong> Math.ceil() if the<br />

value parameter is negative.<br />

Parameters<br />

value:Number - A number to be rounded to an integer.<br />

Returns<br />

Number - The truncated integer value.<br />

See also<br />

round (Math.round method), floor (Math.floor method), ceil (Math.ceil method)<br />

isFinite function<br />

isFinite(expression:Object) : Boolean<br />

Evaluates expression <strong>and</strong> returns true if it is a finite number or false if it is infinity or<br />

negative infinity. The presence of infinity or negative infinity indicates a mathematical error<br />

condition such as division by 0.<br />

Parameters<br />

expression:Object - A Boolean value, variable, or other expression to be evaluated.<br />

Returns<br />

Boolean - A Boolean value.<br />

Example<br />

The following example shows return values for isFinite:<br />

isFinite(56)<br />

// returns true<br />

isFinite(Number.POSITIVE_INFINITY)<br />

//returns false<br />

52 ActionScript language elements

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!