Thanks Jim
It is AS2, and the context is below. Btw what is the difference between
Math.rand() and Math.random()?
// ---------------------------------------------------
// If two moves are equally good, make a random choice
// ---------------------------------------------------
if (goodness == bestWorst) {
numOfEqual++;
if (Math.abs(rand.nextInt()) % 10000 < (10000 / numOfEqual)) {
bestXPos = i;
}
}
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of jim
Sent: 02 November 2006 22:50
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] OT conver java code to flash
Which version of actionscript? And in whats the context?
The only thing that dosnt look like it will directlty port over is the
rand.nextInt() but you can use Math.rand() the rest is basic maths stuff you
can do in actionscript.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Steven
Sent: 02 November 2006 17:15
To: 'Flashcoders mailing list'
Subject: [Flashcoders] OT conver java code to flash
Not familiar with Java code but trying to rewrite some code in Flash. Anyone
convert this line to flash actionscript please
if (Math.abs(rand.nextInt()) % 10000 <
(10000 / numOfEqual))
bestXPos = i;
Thanks
Paul
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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