加載我看到有flash.media.Sound類的奇怪行爲中的Flex 3如何處理錯誤使用Flex聲音
var sound:Sound = new Sound();
try{
sound.load(new URLRequest("directory/file.mp3"))
} catch(e:IOError){
...
}
然而,這並沒有幫助。我收到一個流錯誤,它實際上看起來是在Sound構造函數中。
錯誤#2044:未處理的IOErrorEvent :. text =錯誤#2032:流錯誤。在...]
我看到Flex文檔中爲IOErrorEvent添加事件偵聽器的一個示例,其中我不必這樣做,並且可以簡單地使用try-catch?我可以設置一個空事件偵聽器嗎?