# FLASH版模問題

2 個已更新項目:

### 1 個解答

• Jack
Lv 5
1 0 年前
最佳解答

有兩種提供您參考~~~~~~

---------------------------------------------------------------------------------------------

http://tw.myblog.yahoo.com/richbrown_tw/article?mi...

[AS2] 自動輪播+按鈕操控跳播__折回跳播前的下一影片繼續輪播

http://tw.myblog.yahoo.com/richbrown_tw/article?mi...

[AS2] 自動輪播+按鈕操控跳播_從跳播處繼續輪播

---------------------------------------------------------------------------------------------

[AS2] 自動輪播+按鈕操控跳播__折回跳播前的下一影片繼續輪播

SWF預覽

第一影格AS2

//

var j:Number = 1; //宣告j變數

var intervalID:Number; //宣告計時器變數

var sec:Number = 3; //設定每幾秒更替內容

var keyNum:Number = 0; //

//

//以陣列設定外部swf檔名,有幾個就設定幾個,可以試著隱藏幾個來預覽看看

var fileName:Array = new Array();

fileName[1] = "981103_as2_alternate_1a.swf";

fileName[2] = "981103_as2_alternate_1b.swf";

fileName[3] = "981103_as2_alternate_1c.swf";

fileName[4] = "981103_as2_alternate_1d.swf";

fileName[5] = "981103_as2_alternate_1e.swf";

fileName[6] = "981103_as2_alternate_1f.swf";

//按下按鈕的事件處理

for (var i:Number = 1; i var myBtn:MovieClip = new MovieClip();

myBtn = eval("num"+i+"_mc");

myBtn.flag = i;

//

myBtn.onRelease = function() {

keyNum = j;

trace(j);

clearInterval(intervalID);

upStatus();

this.gotoAndStop("playing");

j = this.flag;

checkNum();

timekeeper();

this.enabled=false;

};

}

//載入第一個swf

num1_mc.gotoAndStop("_down");

this["num"+j+"_mc"].enabled=false;

j++;

//計時器,

function timekeeper() {

intervalID = setInterval(this, "alternateSwf", 1000*sec);

}

//呼叫timekeeper()函式,即呼叫計時器

timekeeper();

//輪流載入外部swf

function alternateSwf() {

upStatus();

this["num"+j+"_mc"].gotoAndStop("_down");

this["num"+j+"_mc"].enabled=false;

checkNum();

}

//所有影片按鈕狀態跳至其本身的_up影格

function upStatus() {

for (var i:Number = 1; i this["num"+i+"_mc"].gotoAndStop("_up");

this["num"+i+"_mc"].enabled=true;

}

}

//

function checkNum() {

if (j if(keyNum!=0){

j=keyNum;

keyNum=0;

}else{

j++;

}

} else {

j = 1;

}

}

2009-11-25 19:13:26 補充：

最上面那兩個連結~~~的主題裡,,,,,,,就有fla了