1:开机自启动 NativeApplication.nativeApplication.startAtLogin = true;
或者修改注册表
2:打开某个目录的文件
private function tanFile(titleStr:String):void{
var file:File = new File();
var openFileFilter:FileFilter = new FileFilter("Flash影片", "*.swf"); //过滤文件
file.browseForOpen(titleStr,[openFileFilter]);
file.addEventListener(Event.SELECT, fileSelectpd);
}
private function fileSelectpd(e:Event):void {
inputID.text = e.target.nativePath; //绝对路径
}
3:打开文件 过滤
private function tanFile(titleStr:String):void{
var file:File = new File();
//创建一个 文件过滤器 new FileFilter("类型框里的显示文字","过滤类型")
var openFileFilter:FileFilter = new FileFilter("Flash影片", "*.swf"); //过滤文件
file.browseForOpen(titleStr,[openFileFilter]);
file.addEventListener(Event.SELECT, fileSelectpd);
}