如何在as3中显示fileSystemList列表

时间:2011-04-23 18:09:58

标签: flex actionscript-3 filesystems air

我正在进行空中应用,但是用as3编写。 我怎样才能显示用actionscript写的fileSystemList-Component(flex)?

谢谢

1 个答案:

答案 0 :(得分:1)

fileSystemList我也可用于AIR因为AIR1.1见API

另见About file system controls

已编辑请使用操作脚本查找AIR APP示例以创建 FileSystemDataGrid

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication 
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    layout="absolute"
    creationComplete="{onCreationComplet()}">
    <mx:Script>
        <![CDATA[
            import mx.controls.FileSystemDataGrid;

            private var fileSystemDataGrid:FileSystemDataGrid;

            private function onCreationComplet():void
            {
                fileSystemDataGrid = new FileSystemDataGrid();
                fileSystemDataGrid.directory = File.desktopDirectory.resolvePath('');
                fileSystemDataGrid.percentHeight = 100;
                fileSystemDataGrid.percentWidth = 100;
                this.addChild(fileSystemDataGrid);
            }


        ]]>
    </mx:Script>
</mx:WindowedApplication>

希望有所帮助