作者hirabbitt (兔子)
看板Flash
标题[问题] 错误5007?
时间Wed Feb 3 16:11:16 2010
尝试着把一个as汇入到flash里面(cs4)
as档本身debug没有error
但是在flash里播放时
出现了
5007: An ActionScript file must have at least one externally visible
definition.
想请问是什麽意思?
我的as档是官方的
var mySound:Sound = new Sound();
function sineWaveGenerator(event:SampleDataEvent):void {
for ( var c:int=0; c<8192; c++ ) {
event.data.writeFloat(Math.sin((Number(c+event.position)/Math.PI/2))*0.25);
event.data.writeFloat(Math.sin((Number(c+event.position)/Math.PI/2))*0.25);
}
}
mySound.addEventListener(SampleDataEvent.SAMPLE_DATA,sineWaveGenerator);
mySound.play();
出自
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/events/SampleDataEvent.html#includeExamplesSummary
缩址:
http://0rz.tw/UzXYp
感谢
--
◤ __ \__◣
◢◤◢◤ ψhirabbitt
◢ ◤ ◢███◣
◢███◣
黑兔子我啊 █████
█████ 所以所以
██
●█
● █▇███
最喜欢白兔子了 ██
╱╲ ●◥█████◣● 我们要一直在一起喔
◥
╱█
╱╱ ● ◥████ ˇ
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 163.13.127.91
1F:推 cjcat2266:一个AS档只能含一个公开class/interface/namespace定义 02/03 16:35
2F:→ cjcat2266:公开指的是public或internal 02/03 16:36
3F:→ cjcat2266:要多少个private class都无所谓 02/03 16:36