加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flex

发布时间:2020-12-15 04:35:25 所属栏目:百科 来源:网络整理
导读://下载号码清单 ???var downLoadfile:FileReference; ???protected function downLoadFile(url: String):void ???{ ???? ????if((isTypeTxt)||((url.substr(url.lastIndexOf("."),4))==".xls")){ ?????var tem:String; ?????if(isTypeTxt){ ??????tem="确认
//下载号码清单 ???var downLoadfile:FileReference; ???protected function downLoadFile(url: String):void ???{ ???? ????if((isTypeTxt)||((url.substr(url.lastIndexOf("."),4))==".xls")){ ?????var tem:String; ?????if(isTypeTxt){ ??????tem="确认导出TXT?"; ?????}else{ ??????tem="确认导出Excel?" ?????} ?????Alert.show(tem,"提示",Alert.YES|Alert.NO,null,function(eve:CloseEvent):void{ ??????if(eve.detail==Alert.YES){ //???????url = config.url+url; ???????var downloadURL:URLRequest = new URLRequest(url); ???????downLoadfile = new FileReference(); ???????configureListeners(downLoadfile); ???????downLoadfile.download(downloadURL); ??????} ?????} ?????); ????}else{ ?????Alert.show("数据大于60000条,将使用TXT格式导出n确认导出?",function(eve:CloseEvent):void{ ??????if(eve.detail==Alert.YES){ //???????url = config.url+url; ???????var downloadURL: URLRequest = new URLRequest(url); ???????downLoadfile = new FileReference(); ???????configureListeners(downLoadfile); ???????downLoadfile.download(downloadURL); ??????} ?????} ?????); ????} ???} ??? ???//监听文件下载 ???private function configureListeners(dispatcher:IEventDispatcher):void { ???? ????//监听文件下载完成 ????dispatcher.addEventListener(Event.COMPLETE,completeHandler); ????dispatcher.addEventListener(ProgressEvent.PROGRESS,progressHandler); ????dispatcher.addEventListener(Event.OPEN,showBar); ???? ???} ??? ???//文件下载开始时执行 ???private function showBar(event:Event):void { ???? ????var barTitleWindow:UploadProgressBar = new UploadProgressBar(); ????upBar =(UploadProgressBar)(barTitleWindow); ????PopUpManager.addPopUp( barTitleWindow,DisplayObject(Application.application),true); ????PopUpManager.centerPopUp(barTitleWindow); ???? ???}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读