var MC:movie clip = this . createemptymovie clip(" MC ",1);
函數loadpic() {
pic . removemovieclip();
MC . attach movie(" pic "+(random(20)+1)," pic ",1);
}
interval = setInterval(loadpic,5000);
-
或者將1張圖片分別放入20幀,然後在第壹幀加碼。
stop();
函數loadpic() {
gotoAndStop(random(20)+1);
}
setInterval(loadpic,5000);