回答數(shù)
5
瀏覽數(shù)
100
先新建一個(gè)文件夾,將你要播放的那首歌放入文件夾中。打開(kāi)flash.下面中的pp是記錄聲音當(dāng)前位置。xx是隨意命名的。
1。先選中第一帖,按動(dòng)作輸入命令。
xxsnd=new Sound();
xxsnd.loadSound("歌名.mp3",true);
xxsnd.start(0);
stop();
pp=0
isplay=1
2。在窗口——公用庫(kù)中拖入快進(jìn)、快退、暫停按扭,選中暫停按扭,輸入:
on (release) {
if (isplay == 1) {
pp = xxsnd.position;
xxsnd.stop();
isplay = 0;
} else {
xxsnd.start((pp/1000+10));
isplay = 1;
}
}
選中快進(jìn)按扭輸入:
on (release) {
if (isplay == 1) {
pp = xxsnd.position;
xxsnd.start((pp/1000+10));
}
}
選中快退按扭輸入:
on (release) {
if (isplay == 1) {
pp = xxsnd.position;
xxsnd.start((pp/1000-10));
}
}
3。按ctrl+Enter即可播放了。