醒着☆☆

H5 Laya Native Game

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: :: 管理 ::

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);   
     }    

posted on 2011-01-16 22:56  醒着/☆☆  阅读(240)  评论(0编辑  收藏  举报