サウンドコントロール
ボタンコントロール
- 外部ファイルの読み込みがもっとも簡単な記述です
var snd1:Sound=new Sound(); var snd2:Sound=new Sound(); var snd3:Sound=new Sound(); play1_btn.onRelease = function() { snd1.loadSound("p01.mp3",true); snd1.start(); } play2_btn.onRelease = function() { snd2.loadSound("p02.mp3",true); snd2.start(); } play3_btn.onRelease = function() { snd3.loadSound("p03.mp3",true); snd3.start(); } stop1_btn.onRelease = function() { snd1.stop(); } stop2_btn.onRelease = function() { snd2.stop(); } stop3_btn.onRelease = function() { snd3.stop(); }