Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: RE: FLASH: set variable randomly, numbers should only be taken once
From: Branden Hall
Date: Tue, 11 Jul 2000 22:34:03 +0100

Just for shits and giggles, I threw this together.. enjoy...

Set Variable: "numElements" = 5
Set Variable: "maxVal" = "56"
Set Variable: "outer" = 1
Loop While (outer <= numElements)
Set Variable: "duplicate" = true
Loop While (duplicate = true)
Set Variable: chr(ord("a")+outer-1) = random(maxVal)+1
Set Variable: "duplicate" = false
Set Variable: "inner" = 1
Loop While (inner < outer and duplicate = false)
If (eval(chr(ord("a")+inner-1)) =
eval(chr(ord("a")+outer-1)) )
Set Variable: "duplicate" = true
End If
Set Variable: "inner" = inner+1
End Loop
End Loop
Trace (chr(ord("a")+outer-1)&":"&eval(chr(ord("a")+outer-1)) )
Set Variable: "outer" = outer+1
End Loop

-= Branden J. Hall
-= Multimedia Developer / Instructor
-= Fig Leaf Software - "We've got you covered!"


-----Original Message-----
From: owneratchinwag [dot] com [owneratchinwag [dot] com]On">mailto:owneratchinwag [dot] com]On Behalf Of Kenneth
Austin
Sent: Tuesday, July 11, 2000 5:14 PM
To: 'flasheratchinwag [dot] com'
Subject: RE: FLASH: set variable randomly, numbers should only be taken
once





I wrote a script for doing that in flash, I'll mail it to you personally.
(doubt you're gonna do anything with the VB, i wouldn't)


peace

{............kc.
www.bzort-12.com
.......}


-----Original Message-----
From: owneratchinwag [dot] com [owneratchinwag [dot] com]On">mailto:owneratchinwag [dot] com]On Behalf Of TGunn
Sent: Tuesday, July 11, 2000 1:42 PM
To: flasheratchinwag [dot] com
Subject: Re: FLASH: set variable randomly, numbers should only be taken
once


>i need to set 5 variables to random number out of 56, the thing is that
>every number should only be taken once, how do i do that? that's how far i
>got:
>
>Set Variable: "a" = (Random(56)+1)
>Set Variable: "b" = (Random(56)+1)
>Set Variable: "c" = (Random(56)+1)
>Set Variable: "d" = (Random(56)+1)
>Set Variable: "e" = (Random(56)+1)
>
>nadia

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com



flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: set variable randomly, number, Helen Triolo

Replies
  RE: FLASH: set variable randomly, number, Kenneth Austin

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]