2011-10-20 3 views

答えて

0

SoundおよびSoundChannelオブジェクトを既に作成しているとします。

private var mySound:Sound; 
private var mySoundChannel:SoundChannel; 

function onButtonClick(e:MouseEvent):void { 
    var pos:Number = 0; 
    if (mySoundChannel) { 
     pos = mySoundChannel.position; 
     mySoundChannel.stop(); 
    } 
    //jump ahead 20 seconds, the play accepts time in ms 
    mySoundChannel = mySound.play(pos + (20 * 1000)); 
} 
関連する問題