Her er et script, der løser den opgave.. Bare kopier det ind i en tom flash-film i første frame:
MovieClip.prototype.lavClips = function() {
for(i = 1; i < 6; i++) {
createEmptyMovieClip("pic" + i, i);
this["pic" + i]._visible = false;
this["pic" + i]._alpha = 0;
this["pic" + i].slutAlpha = 0;
this["pic" + i].loadMovie("pic" + i + ".jpg");
this["pic" + i]._x = 150;
this["pic" + i]._y = 50;
}
}
lavClips();
createEmptyMovieClip("tid", 0);
tid.createTextField("blah", 1, 10, 10, 500, 50);
tid.onLoad = sek = 0; min = 5;
tid.onEnterFrame = function() {
tid = String("" + (getTimer() + startTid));
c = tid.length;
centi = 100 - int(tid.substring(c - 3, c - 1));
if(centi == 100) centi = 00;
if(getTimer() > startTid + 1000) {
sek--;
if(sek < 0) {
sek = 59;
min--;
}
startTid = getTimer();
}
if(String(centi).length == 1) centi = "0" + centi;
if(String(sek).length == 1) sek = "0" + sek;
this.blah.text = min + ":" + sek + ":" + centi;
tal = 5 - min;
for(i = 1; i < 6; i++) {
if(i != tal) _root["pic" + i].slutAlpha = 0;
else _root["pic" + i].slutAlpha = 100;
if(_root["pic" + i]._alpha != _root["pic" + i].slutAlpha) {
_root["pic" + i]._alpha += (_root["pic" + i].slutAlpha > _root["pic" + i]._alpha) ? 2 : - 2;
}
}
if(min == 0 && sek == 0) delete this.onEnterFrame;
}
Du skal så have 5 billeder med filnavn "pic1.jpg", "pic2.jpg"... i samme mappe som flashen.
http://62.199.241.199/5minutter.html(o;