Use FileReference to download file from a URL : URLRequest : Network Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Network » URLRequest »

 

Use FileReference to download file from a URL


 

package{
  import flash.display.Sprite;
  import flash.net.*;
  public class Main extends Sprite{
    public function Main(){
        var fileReference:FileReference = new FileReference(  );
        
        var urlRequest:URLRequest = new URLRequest("http://www.myexamplesite.com/example.txt");
        fileReference.download(urlRequest);

    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Network
» URLRequest