fileupload.mxml

来自「flex开发的文件上传程序。比较简单实用。」· MXML 代码 · 共 24 行

MXML
24
字号
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns="*" creationComplete="init();">
	<mx:Script>
         <![CDATA[
             import flash.net.FileReference;
             import mx.controls.Alert;
             import mx.events.CloseEvent;
             import flash.events.*;
 
             private var file: FileReference;
 
             private function init(): void{
                 Security.allowDomain("*");
                 file = new FileReference();
                 file.addEventListener(ProgressEvent.PROGRESS, onProgress);
                 file.addEventListener(Event.SELECT, onSelect);
             }
 
             private function upload(): void{
                 file.browse();
             }
             
             private function onSelect(e: Event): void{
                 Alert.show("涓婁紶 " + file.name + " (鍏

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?