PDA

View Full Version : array question



x.vector
March 29th, 2003, 06:02 AM
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

pom
March 29th, 2003, 07:34 AM
I don't understand what you mean... Can you show an example?

x.vector
March 29th, 2003, 10:56 AM
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

lostinbeta
March 29th, 2003, 01:14 PM
I am going to assume you are talking about 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.

pom
March 29th, 2003, 01:18 PM
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 :)

lostinbeta
March 29th, 2003, 01:18 PM
Ilyas: If you want to select random clips you could store their instance names in an array and call them randomly with setInterval... right?

pom
March 29th, 2003, 01:24 PM
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 :)

lostinbeta
March 29th, 2003, 01:29 PM
True... true...

So many methods to do 1 thing :) Gotta love Flash.

Marz
March 29th, 2003, 05:37 PM
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

x.vector
March 29th, 2003, 05:53 PM
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