So, I've created a save system for my game.The thing is it works fine on Flash and Air for desktop, but not Air For iOS when I wrap it as an iOS app.Does sharedObject.getLocal work with iOS? If not, what else can I use?
Asked
Active
Viewed 654 times
0
-
It works for me. There are some differences between recent AIR SDK versions as to where SharedObject data is stored on iOS but that shouldnt affect you. – Apr 19 '13 at 23:35
1 Answers
0
Yes, it should work. If var mySharedObject.getLocal("game")
does not work, then you probably have a corrupted system, or a very old version of IOS. To be sure, post the code you're using. Also, make sure you have a correct render mode for your type of application.
2nd Option: Check your memory. If you don't have enough memory to support SharedObject, it won't store the memory. Do a test, add this code:
if(mySharedObject.size != 0)
{
textfield.text = "works."
}else{
textfield.text = "nowork."
make a textbox input called 'textfield' and a SharedObject variable 'mySharedObject'.
-
Thank you for your response, could it be the fact that I have an hasOwnProperty function in? It works absolutely perfectly with Flash Player, but not iOS. – user1666767 Apr 20 '13 at 07:45
-
-
loadgame.addEventListener(MouseEvent.CLICK, loadgameclick); function loadgameclick(e:MouseEvent) { if(so.data.hasOwnProperty("save") == false) { gotoAndStop(65); } if(so.data.hasOwnProperty("save") == true) { gotoAndStop(so.data.save); } } – user1666767 Apr 22 '13 at 19:29
-
First of all, let me tell you how stupid I am, turned out I forgot the flush. XD But now, another problem has occured.When it goes to so.data.save now, it is like the frameRate is 0, the button animation works, but the buttons' function is to move the player and it's not working. – user1666767 Apr 22 '13 at 20:06