Skip to main content
Applauz
Inspiring
May 2, 2018
Question

Has the default applicationStorageDirectory changed?

  • May 2, 2018
  • 1 reply
  • 299 views

I've run a few tests while adding files in CC in the Included Files tab.  Ive tried adding a file and a folder with a file.. no luck with accessing either. Trying with AIR 29.

var f:File = File.applicationStorageDirectory.resolvePath("/assets/music.mp3");

var resultUrl:String = f.url; // This works to load with a URLLoader

var resultPath:String = f.nativePath; // This works to load with a FileStream operation

trace(resultPath);

var req:URLRequest = new URLRequest(resultUrl);

var mySound:Sound = new Sound();

mySound.load(req);

mySound.play();

This topic has been closed for replies.

1 reply

natural_criticB837
Legend
May 2, 2018

Try applicationDirectory instead. Storage is only used when writing files at runtime and loading them later. Packaged files however are located at the applicationDirectory