In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

getRandInt()

unionのreactorに入っている便利ツールのひとつ
getRandInt(min:int,max:int):int
min以上max以下のランダムな整数を返します。
Get Adobe Flash player
by keno42 08 Sep 2009
/**
 * 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));
            }
        }
    }
}