What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
Kongregate is a community-driven browser games portal with an open platform for all web games.
Get your games in front of thousands of users while monetizing through ads and virtual goods.
Learn more »
I know this isn’t the best spot to ask, but I need some help with the SharedObject in Flash 8. It automatically updates and saves (aka flushes) the variables saved to the [Shared Object instance].data section… Unfortunately, this isn’t exactly beneficial when you’re attempting to make a game that only saves when you want it to (and not all of the time).
I’ve been trying to look around forums to figure out how to prevent this, and to no avail. Do any coders here know how to manipulate the Shared Object well?
I’m also having a major issue with saving custom-made Class instances to it. Since Flash only duplicates the pointer and not the actual data, am I forced to store all of the instance’s data in a monstrous Array?
One of my main issues aside from the class file issue (since I can work around it with a cloneInstance() type function) is when Flash **automatically** updates the .data portions of the Shared Object. For instance, say I have an inventory Array, and the first 5 portions are occupied with an InventoryItem instance. I hit save, and it saves my inventory array, which is fine. However, if I start adding items to my array and shut down the Flash, then it automatically adds those items to .data array that I stored… This isn’t very effective for any game where you don’t want a real-time update of all your variables.
I have no idea how to work around this, as I can’t seem to find many tutorials that explain how to utilize the SharedObject in any specific way except to remember Highscores… Arcane, I tried your method (which I already had in mind), but it doesn’t prevent the above situation from occurring.
Could I nullify the SharedObject variable (whatever I made it) after saving to prevent a real-time update?
Okay, sorry for a message spam. I think I figured out my issue with the automatic updating. If I set the SharedObject variable I created to “null”, then it doesn’t automatically update my file. I’ll just have to use a cloning function for my class files. Thanks for the help and the jump-start on how to solve this. :)