Copy link to clipboard
Copied
Hello,
I created a simple game for mobile devices using AIR. I use shared objects to save a few achievements and high scores to the device. The problem is that this works perfectly for android devices but the very same code does not work for the iPhone. Anyone else have this problem?
Copy link to clipboard
Copied
FIXED - For some reason I had to run flush() in the DEACTIVATE method. Didn't have to do this for Android.
NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE , handleDeactivate, false, 0, true);
function handleDeactivate(event:Event):void {
volLevel = 0;
volTransform.volume = volLevel;
musicChannel.soundTransform = volTransform;
achieve.flush();
sStar.flush();
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now