Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: An array that randomly plays through a series |
From: | Troy Swain |
Date: | Fri, 22 Sep 2000 13:13:14 +0100 |
On the click of a button, an animated character gets a haircut.
There are several different haircuts.
Let's say there are three different haircuts.
And they're called,
haircut1
haircut2
and haricut3
I would like it so that, on the first click, a random haircut would
play. On the following click of the button, one of the other two haircut
animations would play (until all haircuts are played).
I still don't really understand the whole _concept_ of an array (I'm a
designer and I'm slowly learning programming), but from what I do
understand, it seems like that's what I should be looking at.
BTW, if you want to see what I'm working on, look at www.funkyafro.com.
Troy Swain
-----------------------
F U N K Y A F R O
-----------------------
718.302.9067
troyswain
![at](/sites/all/modules/spamspan/image.gif)
This is actually a repost. My question is a variation of a question
asked a few days ago. No one responded, so I thought I'd give it another
shot.
Bob Shuster's original query:
I have a current Flash 4 project where a funky background loop is
playing. As four bullet points animate in (this happens repeatedly
with different text!), they are accompanied by a musical tone that
complements the underlying track. I have it set up currently so that
four random tones are picked from a set of five. Here's the code I
used:
Begin Tell Target ("tone" & Random (4))
Go to and Play ("start")
End Tell Target
where there are individual movie clips on the timeline named "tone0"
through "tone4". Each MC obviously has a stop on its first frame,
and "start" plays the tone and parks it back at the first frame when
through.
This works great - however it seems to repeat notes quite a bit more
than I'd like! What I'd like to do is this: I'd still like it to be
four random notes out of five choices, *but* once a note is played in
a particular four-note sequence, I'd like it to be removed as a
choice until the end of that sequence.
i.e.:
note one - choose one tone randomly out of five and remove this tone
from future consideration
note two - choose one tone randomly out of the remaining four and
remove this tone from future consideration
note three - choose one tone randomly out of the remaining three and
remove this tone from future consideration
I think you get the idea! I seem to recall from my elementary C and
Basic programming courses (of more than 15 years past!) that I will
probably need to use an array somehow to do this? It's a vague
recollection at best, and I don't have the foggiest idea of how to go
about setting something like this up!
Anyone have any suggestions? It needs to be Flash 4 for this
project, but I'm sure if there's a simpler Flash 5 solution, someone
will benefit from it! :) Thanks very much - this list rocks! -
Bob Shuster
--
-=< protonMEDIA - the future of web design! >=-
-=< email: Bob
![at](/sites/all/modules/spamspan/image.gif)
-=< main phone: 215-721-8798 my office: 215-402-0753 >=-
-=< FAX: 215-721-8643 FAX2: 215-402-0752 >=-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email help
![at](/sites/all/modules/spamspan/image.gif)
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]