var url:URLRequest = new URLRequest("deleteme.txt");
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, function(e:Event):void
{
trace("loaded it", loader.dataFormat);
var foo:String = loader.data.toString();
trace("loaded:", foo);
});
loader.load(url);
trace("loaded: ", loader.data);
Has this issue been fixed?
I noticed on the build notes for scaleform/unity that an issue similar to this had been resolved but we are experiencing a crash on android devices whenever we try to use the load method of a Loader Object.
If not does anyone have a workaround for this problem?
Hello Andy,
I just tested the actionscript code from the OP in our latest March release and this works as expected (no crash, text loads). As part of an APK, this should be just fine. OBBs are another story.
If you're not on the latest March release, I would suggest making a backup and try to upgrade.
There's a brief upgrade guide here: Unity Update Guide
If upgrading doesn't solve the problem, would you mind posting a snippet that I could use to try and replicate the crash with?
Thanks,
Adam
Hi Adam, thanks for your reply.
We have a half win after installing the newest (March 2014) version of Scaleform, the app no longer crashes on device when using the load method of the Loader object, but neither does it actually load the image. I am able to catch an error however and will investigate this issue further.
After finding a bit of time to investigate the error message, it is as follows: "Error reading " and then the filename. The file is a jpg, and is being loading from the sd card, I have verified that it does exists in the url it is attempting to load.
Any ideas would be appreciated.
> The file is a jpg, and is being loading from the sd card
This is a known issue. At the moment, we only support loading files from the .apk. We're discussing potential solutions needed to include other directories and .obb archives.