# Array question

**URL:** <https://forum.kirupa.com/t/array-question/16880>\
**Category:** flash\
**Created:** [March 29, 2003, 11:02am UTC](https://forum.kirupa.com/t/array-question/16880 "2003-03-29T11:02:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![x\_vector](https://avatars.discourse-cdn.com/v4/letter/x/b9e5f3/32.png) [@x\_vector](https://forum.kirupa.com/u/x_vector)\
**Post date:** [March 29, 2003, 11:02am UTC](https://forum.kirupa.com/t/array-question/16880/1 "2003-03-29T11:02:21Z")

</div>

hi ,

for my site i want to create this effect seen on many sites  
( i think 2advance got it to )

how do i let movie clips “lit” up at random ??

i assume i need to use arrays … if anyone could give me a hint or two that would much appreciated 🙂

hope i made clear what i effect i’m lookin’ for

lat0rrrrr

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 29, 2003, 12:34pm UTC](https://forum.kirupa.com/t/array-question/16880/2 "2003-03-29T12:34:06Z")

</div>

I don’t understand what you mean… Can you show an example?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 29, 2003, 3:56pm UTC](https://forum.kirupa.com/t/array-question/16880/3 "2003-03-29T15:56:15Z")

</div>

darn it … 2advanced hasn’t got the effect …  
and i can’t remember the site …

the effect was like this …

background had an image of woman’s face …  
at random you saw shapes appear on her face …

i think it was done with array … let shape-mc go from unvisible to visible in random order ( or something like that ) …

problem is my knowledge of AS doesn’t involve arrays yet ☹

i hope i explained it a bit better …

(will try to find the site …)

lat0rrrrrrrr

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 29, 2003, 6:14pm UTC](https://forum.kirupa.com/t/array-question/16880/4 "2003-03-29T18:14:31Z")

</div>

I am going to assume you are talking about [http://www.xeofreestyle.com](http://www.xeofreestyle.com) as they have a guys face that does that (used to be a girl though)

The timing is not random though, they are just cleverly created tweens to be spaced out to seem random.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 29, 2003, 6:18pm UTC](https://forum.kirupa.com/t/array-question/16880/5 "2003-03-29T18:18:03Z")

</div>

Well, I don’t see what you mean in that site (but I have a bad headache, maybe that’s why) but I don’t think arrays are necessary. If you want to have an event appear at a random interval of time, you’ll need to use setInterval, and change the interval each time 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 29, 2003, 6:18pm UTC](https://forum.kirupa.com/t/array-question/16880/6 "2003-03-29T18:18:57Z")

</div>

Ilyas: If you want to select random clips you could store their instance names in an array and call them randomly with setInterval… right?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 29, 2003, 6:24pm UTC](https://forum.kirupa.com/t/array-question/16880/7 "2003-03-29T18:24:45Z")

</div>

I guess so, but each clip could have a life of its own, handling its own setInterval without the need to monitor all the clips by putting them in an array 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 29, 2003, 6:29pm UTC](https://forum.kirupa.com/t/array-question/16880/8 "2003-03-29T18:29:33Z")

</div>

True… true…

So many methods to do 1 thing 🙂 Gotta love Flash.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 29, 2003, 10:37pm UTC](https://forum.kirupa.com/t/array-question/16880/9 "2003-03-29T22:37:50Z")

</div>

My particle system handles each clip in an array instead of them seperately… It’s about 10-20 times faster this way 😉

Using the functions push and splice you can make this possible…

As for the effect… i think it’s just merely tweening 🙂

playamarz

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 29, 2003, 10:53pm UTC](https://forum.kirupa.com/t/array-question/16880/10 "2003-03-29T22:53:04Z")

</div>

lost … ur great … that’s the site i meant … 🙂

well i don’t know how to use the setInterval thingie …  
so i will just tween the shapes or some …

thnx for the tips
