How to make a randomnumber in flash AS2

How to make a randomnumber in flash AS2

by symiily
Report a bug
Flag Game
โญ Top
Swords and Souls
โญ Top
Epic Battle Fantasy 4
โญ Top
Mutilate-a-Doll 2
โญ Top
UnpuzzleX
โญ Top
Escape Game - Computer Office Escape
โญ Top
Bloons TD 5
โญ Top
The King's League: Odyssey
โญ Top
Retro Bowl
โญ Top
Kingdom Rush
โญ Top
Incremancer
โญ Top
Epic Battle Fantasy 5
โญ Top
Kingdom Rush Frontiers
โญ Top
Bloons Monkey City
โญ Top
The Enchanted Cave 2
โญ Top
Learn to Fly 3
โญ Top
SAS: Zombie Assault 4
๐Ÿ”ฅ Hot
NGU IDLE
โญ Top
Learn to Fly 2
โญ Top
Bit Heroes
โญ Top
Fleeing the Complex
Loading ad...

How to make a randomnumber in flash AS2

Rating:
2.2
Released: February 04, 2010
Last updated: February 04, 2010
Developer: symiily

Tags for How to make a randomnumber in flash AS2

Description

Here is a tut about how to make a random number in flash

How to Play

Use the mouse to move(suprise!).

Comments

0/1000
HerrSerker avatar

HerrSerker

Feb. 10, 2010

0
0

Just a tut with NO explanations how to alter to settle for your needs heres how

if you want a numer that is in the range from say 1 to 6 you need Math.floor(Math.random()*6+1). If you need numbers from placeholders a through to b try this: Math.floor(Math.random() * (b-a+1) + a), e.g. from -5 to +5 , so a equals -5 and b equals +5: Math.floor(Math.random()*(+5-(-5)+1)+(-5)) this is Math.floor(Math.random()*11-5). Should be correct, sue me if not

wertyujh avatar

wertyujh

Feb. 04, 2010

0
0

yeah, it is. Math.random() generates a random number between 0 and 1. like 0,5332232
so, i would say, on(release)
{
random = Math.random()*10 + 1

Alonski avatar

Alonski

Feb. 04, 2010

0
0

This is pretty bad looking sorry to say. Should look nicer. People like nice graphics... Also isn't there a random number generator in flash? Math.random() anyone?

Carr77 avatar

Carr77

Feb. 04, 2010

0
0

aaaand what can i do whit this?

Tutorial: How to make a basix Maze Game without any experience
How To Solve A Rubik's Cube!!
โญ Top
Flash Games Tut2
โญ Top
Flash Tutorial For Beginners
for god sake don't click!
how to make a basic adventure game using flash
basic flash tutorial
Tutorial: How to make a Basix Pong Game
I wanna be a popstar
MnB2:How to win