0
我收到此错误消息: col:4:错误:嵌入变量不能具有现有值。 错误指的是带有“[Embed(source =”../bin/03Outside.mp3“)]”的行。 在第一个“[},有一个红色的线(我相信这表明它是什么是错的)当我收到此消息时,向FlashDevelop添加声音(mp3)?
这里是我的代码:!
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.media.Sound
/**
* ...
* @author Kendall Murray
*/
public class Main extends Sprite
{
public function Main():void
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point
[Embed(source = "../bin/03Outside.mp3")]
var mySound:Sound = new Sound();
mySound.load(new URLRequest("03Outside.mp3"));
mySound.play();
}
}
}
请帮忙,谢谢