dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: clouds

  1. #1
    Junior Member
    Join Date
    Apr 2005
    Location
    the Netherlands
    Posts
    1

    clouds

    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)

  2. #2
    Noor._alpha = 0 ! nooor83's Avatar
    Join Date
    Aug 2005
    Posts
    252
    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

  3. #3
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Quote Originally Posted by nooor83
    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.

  4. #4
    Noor._alpha = 0 ! nooor83's Avatar
    Join Date
    Aug 2005
    Posts
    252
    ohh..ya u r rigth..bw 0 & 10..

    thanx anyway for the new function randomrange..

    Noor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center