0
說我有這個JavaScript函數:閃光的JavaScript接口
function updateMainBuff(buff) {
// do some stuff
}
我有這個功能在我的Flash項目(完整的源代碼在這裏:bitly.com/SnyhGT):
protected function recordSampleDataHandler(event:SampleDataEvent):void
{
while(event.data.bytesAvailable)
{
var sample:Number = event.data.readFloat();
buffer.writeFloat(sample);
if(buffer.length % 40000 == 0){
triggerEvent('recordingProgress', recordingDuration(), microphone.activityLevel);
}
}
}
我需要做的是推動每個var sample
浮動到JavaScript函數updateMainBuff