/ Published in: ActionScript 3

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import flash.filesystem.File; import flash.filesystem.FileMode; import flash.filesystem.FileStream; var file:File = File.desktopDirectory.resolvePath( "file.txt" ); var stream:FileStream = new FileStream(); var xmlLoader:URLLoader = new URLLoader(); xmlLoader.addEventListener(Event.COMPLETE, onLoaded); function onLoaded(e:Event):void { stream.open( file, FileMode.WRITE ); stream.writeUTFBytes(e.target.data); stream.close(); file = null; stream = null; } xmlLoader.load(new URLRequest("http://www.yourfeedurl.com/file.xml"));
Comments
