If you are working with one six-sided die, you want to generate a random number between 1 and 6 each time : Math : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » Math »

 

If you are working with one six-sided die, you want to generate a random number between 1 and 6 each time


 
package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

          var nValue:Number = Math.floor(Math.random() 61;
          trace(nValue);

    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Development
» Math