mdm.Dialogs.BrowseFile.show()打开文件对话框读取文件路径,比flash自带那个爽多了,读完整路径:
这里,dlg是一个按钮,标签Label为“打开文件对话框",txt是个textInput.
读取了完整的路径名。嘻嘻。
import mdm.*;
mdm.Application.init(this, onInit);
function onInit():void {
// 启动程序...
}
dlg.addEventListener(MouseEvent.CLICK,openFile);
function openFile(evt:MouseEvent):void
{
var myfile:String = mdm.Dialogs.BrowseFile.show();
txt.text=myfile;
}
mdm.Application.init(this, onInit);
function onInit():void {
// 启动程序...
}
dlg.addEventListener(MouseEvent.CLICK,openFile);
function openFile(evt:MouseEvent):void
{
var myfile:String = mdm.Dialogs.BrowseFile.show();
txt.text=myfile;
}
这里,dlg是一个按钮,标签Label为“打开文件对话框",txt是个textInput.
读取了完整的路径名。嘻嘻。
转载于:https://blog.51cto.com/xcf007/101170