Flasher Archive

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


Subject: Re: FLASH: controlling random
From: Darren Critchley
Date: Tue, 14 Mar 2000 00:53:19 GMT

Matt Spiegler wrote:

> this may be a dumb question, but...
> Is there a way to use the random function so as to assure that the same
> pictures don't get displayed twice? In other words, say I have 10
> symbols, "pic1" through "pic10". When a button is clicked, I want the
> visible of one of the 10 symbols set to true. This much I can handle.
>
> But I then want to guarantee that once a picture has been displayed, it
> will in effect be removed from the "random" pool, so that it can't be
> displayed again, and once they've all been displayed the show ends.
> Thepictures will be displayed one at a time. Thanks!
>
> MAtt
>

Create an array of ten variables, set all the values to 0. As each picture
is displayed, set the value to 1 in the appropriate array. (ie, if it is
picture #4, set element 4 of the array to 1) Then before displaying a
picture, check the value of the array first. If it is a 1, don't display
the picture again, if it is 0 display the picture. Hope this helps.

Darren.


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World�s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California

-Register before Feb 25 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
  FLASH: controlling random, Matt Spiegler

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