Array to call sequential clip numbers

I have clips that are numbered sequentially that i call in actionscript as:

this.showback.onRollOver = function(){
      fadeout(clip1);
      fadeout(clip2);
      fadeout(clip3);
      fadeout(clip4);
      fadeout(clip5);
      fadeout(clip6);
      fadeout(clip7);
      fadeout(clip8);

is there anyway create an array of other method that would enable me to call the function once, and fillin the numbers (1-8).  Something like

fadeout(clip[num])  ?
LVL 1
bjv211Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SavongCommented:
Best way I know of is to reference them from the parent movie scope, you can then reference them as:
for(var i = 0;  i<5; i++){
     fadeout(holdingClip["clip"+i]);
}

as I mentioned the holdingClip reference just has to be the next movie up your chain, which could very well be _root.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vickerleungCommented:
BJV~

Better suggested code will be using an extra variable to store the value first before using
You may say is only fancy stuff, but it worths, especially for debugging purpose

temp_clip_name = ""
for(var i = 0;  i<5; i++)
{
     temp_clip_name = "clip" add i;
     fadeout(holdingClip[temp_clip_name]);
}

Vicker
0
bjv211Author Commented:
Savong, works great and the coding is basic enough not to have debugging issues...woo
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.