【发布时间】:2014-05-02 11:57:28
【问题描述】:
我正在构建一个弹性应用程序
具有上传文件到服务器的功能
客户希望通过将文件拖到图标上来打开应用程序,然后应用程序将启动并开始上传。但我找不到如何实现它
谁能帮助我?任何帮助或链接将不胜感激。
编辑:感谢 alxx
这是我的代码
private function initComponents():void {
NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvokeEvent);
}
public function onInvokeEvent(invocation:InvokeEvent):void {
arguments = invocation.arguments;
currentDir = invocation.currentDirectory;
if(arguments.length > 0)
{
var dfile:File = new File(arguments[0]);
if(dfile.exists) {
if(ArrayUtil.getItemIndex(dfile.extension,ConfigManager.AllSupportedFileExtensions) > -1)
uploadQueue.push(dfile);
if(!logged)
Alert.show("Please login before upload");
}
}
}
【问题讨论】:
标签: apache-flex air icons drag