Dynamic alignment in ActionScript 2.0

I would like to be able to click a button and get a set of movie clips arranged in a row, how would I do that?

0


a source to share


1 answer


Well, this is a really general question. I assume you are placing your AS code inside frames. If this is the case, you should have all MovieClips accessible by their name. So if we pretend that you already have a collection of clips that you would like to align:



var desiredRowYposition = 100;
buttonMc.onClick = function() {
   for (var mc in mcCollection) {
       mcCollection[mc]._y = desiredRowYposition;
   }
}

      

0


a source







All Articles