> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Paul Steven
> Sent: Thursday, November 02, 2006 3:15 PM
> To: 'Flashcoders mailing list'
> Subject: RE: [Flashcoders] OT conver java code to flash
> 
> Thanks Jim
> 
> It is AS2, and the context is below. Btw what is the difference
between
> Math.rand() and Math.random()?

There is no Math.rand(). There was a top-level function, random(), which
returned integers (I think), but it is deprecated. Just use
Math.random():

var MAX:Number = [some positive integer value];
var randomInt:Number = Math.floor(MAX * Math.random()); // Sets it to
some number from 0 to MAX - 1.

―
Mike Keesey



_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to