19 thoughts on “AS3 Random Number Generator Code – ActionScript 3.0 Tutorial”

  1. So, I can see this generator work all day long in preview and in the browser, but when I save to SWF and try to play it in just a player, nothing happens. Is there something that I'm missing?

  2. a question:
    can you use this to display text, rather than numbers? as in using if / else statements?
    if so, what would the code look like, if the base code is:
    var randNum:Number = Math.floor(Math.random() * 10) + 1;
    status_txt.text = ""+randNum;

    thank you for posting these tutorials!!

Leave a Reply

Your email address will not be published. Required fields are marked *