Currently using OpenFL 2.2.5. Would like to update to the newest release, 4.3.1 (?)
I froze updates a long time ago for a major project of mine. This was prior to a major update to OpenFL that included the addition of legacy mode.
Updating and compiling with the legacy flag should be fine- but if not, what steps do I need to take to reverse the process.
I assume I can simply do a “haxelib set openfl 2.2.5” to revert changes, but there’s a complicated stack of dependencies to consider. Any other notable changes to be aware of that could affect my update process?
When did openfl change the location of the shared object/save file?
After updating my installation and fixing some issues, I exported for flash and noticed that my game’s save file was non-existent. I was worried something in the update caused this. However, I downgraded my installation with:
haxelib set openfl 2.2.5
haxelib set lime 2.1.0
And sure enough, after export, my original save file was in-tact.
Is there a way to fix this? unfortunately it’s a pretty big issue that will stop me from going forward with openFL updates.
The code I use to access the save file is: sharedObject = SharedObject.getLocal(savePath);
It’s possible that this might only apply to the flash export, as I’m currently having issues exporting android under the new openFL.
I don’t think this is possible. As Joshua said, that’s where non-Flash builds get saved, but Flash apps are required to save to the default location (in your case, the MMW4F9ED folder). It’s possible to specify a custom path, but only within that folder.
There could still be a different save file somewhere in MMW4F9ED, so try doing a search.
You’re right- it appears that file I mentioned was probably part of a windows export that I didn’t realize. After searching, I found two copies of my flash save file: (coinciding with the two versions of openFL):
It appears that the newer release of openFL adds ‘release’ to the path it uses to save the file.
If this is a flash-only issue I’m ok with it, because I only use flash for testing. But if this affects all platforms I need to find a fix, or else I’ll be losing the connection to the correct save file for all of my players. I’m having trouble with the android export at the moment (…something related to gradle…?) but I’ll get back to you on that later.
Ah! Now that you mention it, that makes a lot of sense.
By default, Flash saves your file in a path mirroring the SWF’s location. And since newer versions of OpenFL add “release” (or “debug”) to the path, that means that will also be added to the save file’s path.
However, this only applies to your personal tests. Once you upload the SWF file to wherever you host it, its path will be determined by that host. And most SWF file hosts are well aware of how saves work, so they take care not to change the URL.
Also, all of this is Flash-only. You have nothing to worry about on other platforms.