for (var j:int = 0; j < cargoContent.length; ++j) { warehouse['item' + (j+1)].gotoAndStop(cargoContent[j] + 1); }