<?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script> <![CDATA[ import flash.filesystem.*; import flash.events.*; var os:File = File.applicationStorageDirectory.resolve ("prisma.flv"); var ds:File = File.applicationStorageDirectory.resolve ("primacopy.flv"); private function read():void { var str:FileStream = new FileStream; str.openAsync(os, FileMode.READ); str.close(); str.addEventListener(Event.COMPLETE, copy) } private function copy(event:Event):void { var ba:ByteArray = event.target as ByteArray //?? var str:FileStream = new FileStream str.openAsync(ds, FileMode.WRITE); str.writeBytes(ba,0,ba.length) str.close() str.addEventListener(Event.COMPLETE, complete) } private function complete():void { text.text = "process completed" } ]]> </mx:Script> <mx:Text id="text" creationComplete="read()"/> </mx:WindowedApplication> I've wrote a sample application that has to do a file copy locally; at this time it gives no output at all Any idea? Thanks, Francesco