montana_13
03-13-2006, 05:03 PM
Hi guys... I'm a new member and also new to actionscript... my question is:
I have this code:
function addClips(sLinkage:String, sLinkage2:String, sLinkage3:String, sLinkage4:String, sLinkage5:String, sLinkage6:String, sLinkage7:String):Void {
var mcImage:MovieClip = attachMovie(sLinkage, "mcImage", this.getNextHighestDepth(), {_x:600, _y:395, _xscale:20, _yscale:20});
var mcText:MovieClip = attachMovie(sLinkage2, "mcText", this.getNextHighestDepth(), {_x:400, _y:500});
var image002:MovieClip = attachMovie(sLinkage3, "image002", this.getNextHighestDepth, {_x:600, _y:395, _xscale:20, _yscale:20});
}
i m calling the function through an event handler... and my code is working just fine.... but what i want to know is how can i use the for statement instead of making a new variable for each movie clip i attach??
thanks
I have this code:
function addClips(sLinkage:String, sLinkage2:String, sLinkage3:String, sLinkage4:String, sLinkage5:String, sLinkage6:String, sLinkage7:String):Void {
var mcImage:MovieClip = attachMovie(sLinkage, "mcImage", this.getNextHighestDepth(), {_x:600, _y:395, _xscale:20, _yscale:20});
var mcText:MovieClip = attachMovie(sLinkage2, "mcText", this.getNextHighestDepth(), {_x:400, _y:500});
var image002:MovieClip = attachMovie(sLinkage3, "image002", this.getNextHighestDepth, {_x:600, _y:395, _xscale:20, _yscale:20});
}
i m calling the function through an event handler... and my code is working just fine.... but what i want to know is how can i use the for statement instead of making a new variable for each movie clip i attach??
thanks