;

PDA

Click to See Complete Forum and Search --> : clouds


NaaMar
08-21-2005, 06:55 PM
Hi!
I would like to recreate the clouds as displayed here: http://www.miniclip.com/sudoku/sudoku.htm. If someone could tell me how I can make the clouds apear random (height, speed, and maybe also transparency, shape)

nooor83
08-21-2005, 07:31 PM
use random(range) function

random(10)

every time u execute this function is gives a number between 1 & 10

so like that u can set different height,speed & transperancy..ect


Noor

blanius
08-21-2005, 07:51 PM
use random(range) function

random(10)

every time u execute this function is gives a number between 1 & 10

so like that u can set different height,speed & transperancy..ect


Noor

Actually you get a number between 0-9.And since I rarely want a number between 0 and anything what I do is use this function to get a random number that is in the range I want.

function randomRange(Min,Max){
return random(Max-Min+1)+Min;
}

then when I need a random number say between 30 and 100

mynumber=root.randomRange(30,100)

NOTE IN THE PREVIEW THE NUMBERS WILL NOT BE RANDOM.

nooor83
08-21-2005, 08:21 PM
ohh..ya u r rigth..bw 0 & 10..

thanx anyway for the new function randomrange..

Noor