作者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
推 cjcat2266:一個AS檔只能含一個公開class/interface/namespace定義 02/03 16:35
→ cjcat2266:公開指的是public或internal 02/03 16:36
→ cjcat2266:要多少個private class都無所謂 02/03 16:36