1

数组中有 3 个影片剪辑。如何播放所有影片剪辑

var mc1:MovieClip;
var mc2:MovieClip;
var mc3:MovieClip;
var mcArray:Array=["mc1","mc2","mc3"];

mcArray.gotoAndStop(2);// ????????????
4

1 回答 1

1
/*
var mc1:MovieClip;
var mc2:MovieClip;
var mc3:MovieClip;
*/

// Assuming MovieClips are on stage with the correct instance names 
// and are accessible from the frame this code is on.
var mcArray:Array=[mc1, mc2, mc3];

for (var i:int = 0; i < mcArray.length; i ++) {
    mcArray[i].gotoAndStop(2);
}
于 2013-11-06T14:46:51.647 回答