未分類

簡易 Flash 輪播照片

pic = 1;
max_pic = 5;
jump = 10;
i = 0;
num = 350;
z = num;
_root.square._alpha = 0;
loadMovie((("img/image"+pic)+".jpg"), "_root.square");
_root.onEnterFrame = function() {
	if (i < num) {
		i +=  jump;
		_root.square._alpha = i;
	} else {
		if (pic == max_pic) {
			pic = 0;
		}
		pic++;
		if (z > 0) {
			z -=  jump;
			_root.square._alpha = z;
		} else if (z == 0) {
			loadMovie((("img/image" + pic) + ".jpg"), "_root.square");
			i = 0;
			z = num;
		}
	}
};