03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Parameters<br />

x:Number - A number.<br />

Returns<br />

Number - A number; an integer.<br />

Example<br />

The following example returns a r<strong>and</strong>om number between two specified integers.<br />

function r<strong>and</strong>Range(min:Number, max:Number):Number {<br />

var r<strong>and</strong>omNum:Number = Math.round(Math.r<strong>and</strong>om() * (max-min+1) + (min-<br />

.5));<br />

return r<strong>and</strong>omNum;<br />

}<br />

for (var i = 0; i

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

Saved successfully!

Ooh no, something went wrong!