Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: random tones using an array? |
From: | Bob Shuster |
Date: | Wed, 20 Sep 2000 22:34:50 +0100 |
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: BobprotonMEDIA [dot] com web: http://protonMEDIA.com >=-
-=< 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 helpchinwag [dot] com
Replies
FLASH: string in font an size, Philippe Warichet
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]