how can i make all mcs (a bunch of them) inside another mc, to gotoAndPlay in a random frame without having to adress each one of them by theyr instance names?
wild guess: a for loop?
Anyone?
Thanks =)
how can i make all mcs (a bunch of them) inside another mc, to gotoAndPlay in a random frame without having to adress each one of them by theyr instance names?
wild guess: a for loop?
Anyone?
Thanks =)
A for…in loop
It’s explained in the AS tricks… :trout:
i knew i forgot to search somewere (-:
thanks Ilyas, you´re pretty fast
Yeah baby… :cowboy:
hehe…
so just to clarify… if i want that all movies inside the ilyas mc on the root, to gotoAndPlay a random frame, i´ll have to use a for in loop like this:
for (mc in _root.ilyas){
gotoAndPlay(random());
}
right?
More or less (careful with the syntax and the values returned by Math.random() though…). And you have to be careful that there are only those movie clips inside ilyas. Otherwise, you’ll have to test it:
for (mc in _root.ilyas){
_root.ilyas[mc].gotoAndPlay(random(20)+1);
}
at least, and
for (mc in _root.ilyas){
if (_root.ilyas[mc] instanceof MovieClip)
_root.ilyas[mc].gotoAndPlay(random(20)+1);
}
would be better (not sure of the syntax though).
pom :bandit:
thank you bery buch! (i got the floo )
another thing…
what is pom?
seriously… what is pom :q:
[SIZE=1]and you may loose the message on you status… i gave up she blew me off completly…[/SIZE]
It means potatoe right? I think I remember you telling me that Ilyas.
…but why potatoes??
I feel sorry for you guig0, I really do… Ah, women…
And pom, well, that some sort of a nickname I guess. It’s actually a shortage of my email address, which is actually a bad joke, so don’t expect me to explain that :evil:
women are bad, BAD!! [SIZE=1]that goes for you kitty :bad:[/SIZE]
about the nick, i understand
:: Copyright KIRUPA 2024 //--