getRandInt()

by keno42
unionのreactorに入っている便利ツールのひとつ
getRandInt(min:int,max:int):int
min以上max以下のランダムな整数を返します。
♥4 | Line 12 | Modified 2009-09-09 01:21:05 | MIT License
play

ActionScript3 source code

/**
 * Copyright keno42 ( http://wonderfl.net/user/keno42 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/2qi9
 */

// unionのreactorに入っている便利ツールのひとつ
// getRandInt(min:int,max:int):int
// min以上max以下のランダムな整数を返します。
package {
    import flash.display.Sprite;
    import net.user1.utils.getRandInt;

    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            for( var i:int = 0; i < 100; i++ ){
                graphics.lineStyle(0, getRandInt(0,0xFFFFFF));
                graphics.drawCircle(getRandInt(0,465),getRandInt(0,465),getRandInt(0,30));
            }
        }
    }
}

Forked