bjv211
asked on
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]) ?
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]) ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Savong, works great and the coding is basic enough not to have debugging issues...woo
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_c
}
Vicker