
Код AS1/AS2:
picturesArray=["img/1.jpg","img/2.jpg","img/3.jpg","img/4.jpg"];
itemCounterPicture = -1;//для корректной первой загрузки, что бы загрузилось именно 1.jpg
mc = attachMovie("mc", "smc", _root.getNextHighestDepth(), {_x:200, _y:100});//тут были не правильные координаты, кнопка "крутить вправо", находилась слева
mc2 = attachMovie("mc", "smc2", _root.getNextHighestDepth(), {_x:100, _y:100});//поменял местами
_root.createEmptyMovieClip("frameForShow",-11);// чтобы копки были выше изображения
//функции которые прокручивают картинки
function nextImg() {
itemCounterPicture++;
if (itemCounterPicture > (picturesArray.length - 1)) {
itemCounterPicture = 0;
}
trace(itemCounterPicture);
frameForShow.loadMovie(picturesArray[itemCounterPicture]);
}
function backImg() {
itemCounterPicture--;
if (itemCounterPicture < 0) {
itemCounterPicture = picturesArray.length - 1;
}
trace(itemCounterPicture);
frameForShow.loadMovie(picturesArray[itemCounterPicture]);
}
//при нажатии кнопок туда-сюда, срабатывают нужные функции
mc.onPress = function() {
nextImg();
};
mc2.onPress = function() {
backImg();
};
// при загрузки флешки, первое изображение появляется автоматом
nextImg();
p.s. Лучше для загрузки пользоваться MovieClipLoader