Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 AdobeAIR AS3:是否对“安全”有限制;浏览OpenMultiple“;?_Actionscript 3_Crash_Air - Fatal编程技术网

Actionscript 3 AdobeAIR AS3:是否对“安全”有限制;浏览OpenMultiple“;?

Actionscript 3 AdobeAIR AS3:是否对“安全”有限制;浏览OpenMultiple“;?,actionscript-3,crash,air,Actionscript 3,Crash,Air,我希望用户选择几个(图像)文件,在选择之后,这些文件将被异步加载并以某种方式处理 我希望我可以使用标准函数“browseForOpenMultiple” 但一旦我选择了130多个文件,飞机就会坠毁 “进程已完成,退出代码为-1.073.740.940” 这是我的测试应用程序: <?xml version="1.0"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"

我希望用户选择几个(图像)文件,在选择之后,这些文件将被异步加载并以某种方式处理

我希望我可以使用标准函数“browseForOpenMultiple”

但一旦我选择了130多个文件,飞机就会坠毁

“进程已完成,退出代码为-1.073.740.940”

这是我的测试应用程序:

<?xml version="1.0"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                       creationComplete="onCreationComplete(event)"
                       xmlns:s="library://ns.adobe.com/flex/spark">
    <fx:Script><![CDATA[

        private function onCreationComplete(event:Event):void {
        }

        private function handleButtonClick(event:MouseEvent):void {
            var imageFilter:FileFilter = new FileFilter("images", "*.jpg; *.png; *.bmp; *.swf");
            var actualFilter:FileFilter;
            var pdfBaseFile:File = new File("C:\\Users\\(userName)\\Documents\\jpgImagesDemoFolder");
            actualFilter = imageFilter;
            pdfBaseFile.addEventListener(FileListEvent.SELECT_MULTIPLE, handleFilesSelected);
            pdfBaseFile.browseForOpenMultiple("Select a file: ", [actualFilter]);
        }

        private function handleFilesSelected(event:FileListEvent):void {
            var fileList:Array = event.files;
            tiResult.text = fileList.length + " files read";
        }

        ]]></fx:Script>
    <s:VGroup width="100%"
              height="100%"
              horizontalAlign="center"
              >
    <s:Button id="btBrowse"
            label="Browse"
            click="handleButtonClick(event)"/>
    <s:TextInput id="tiResult"
                 text = "nothing read yet" />
    </s:VGroup>
</s:WindowedApplication>`

`
我假设由于要加载的文件太多而达到内存限制;虽然我不需要加载文件,但此时我只对文件列表感兴趣

我想我必须以编程方式读取目录(例如,在询问用户目录路径之后),然后将结果(文件路径数组)呈现给用户以供选择

无论如何,我想知道我的假设是否正确,文件数量是否确实有限制;或限制所选文件的累积大小

谢谢你的澄清

更新: 有趣的是,拖放270个文件没有任何问题