Using the Loader-Class with Adobe AIR

Just a quick note because it took me a little while to find out that it’s necessary to use “file://” syntax to access the local file system.

// Basic example:
var url: String = "file:///Users/markusraab/Desktop/yourfile.swf";
 
// or use a file reference:
var file: File = new File();
var url: String = file.url;
 
var loader: Loader = new Loader();
loader.load( new URLRequest( url ) );

Leave a Reply

Your email address will not be published. Required fields are marked *