-1
我製作音樂播放器並使用FileFilter來過濾mp3和..文件。
這是我的代碼:AS3 Flash Builder錯誤參數數量不正確
<![CDATA[
import flash.events.IOErrorEvent;
import flash.events.ProgressEvent;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;
import flash.net.URLRequest;
private var sound:Sound;
private var songLength:String;
private var soundChannel:SoundChannel;
[Bindable]
private var readyToPlay:Boolean = false;
[Bindable]
private var playing:Boolean = false;
private var file:File;
private var filter:FileFilter = new FileFilter("Music", "*.mp3;*.ogg");
protected function browse_clickHandler(event:MouseEvent):void {
file = new File();
file.addEventListener(Event.SELECT, onFileSelect);
file.browseForDirectory("Open",[filter]);
}
在此行中的錯誤:
file.browseForDirectory( 「打開」,[過濾]);
1137:參數的數量不正確。預計不超過1
謝謝