假设我有这个 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 example
浮点插入javascript函数updateMainBuff
最佳答案
这样就可以了
ExternalInterface.call("updateMainBuff", sample);
关于javascript - Flash JavaScript 界面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13122084/