|
|||
|
Could someone help to explain or solve the problem that after packing .swf game, the following funtion couldn't be realized.
What I want to have in the game is that the result or value could be saved or recorded in the computer, but the fact is after packinng, the function couldn't be realized. Would you please give me a hand? Please! Urgent! Many thanks! myLSO = SharedObject.getLocal("saveGame"); if (myLSO.data.myObj == undefined) { first = 0; second = 0; third = 0; forth = 0; } if (myLSO.data.myObj != undefined) { first = myLSO.data.myObj.x; second = myLSO.data.myObj.y; third = myLSO.data.myObj.z; forth = myLSO.data.myObj.f; } |
|
|||
|
We found that the method we used in swfkit v3 could make it work either. Fortunately, we've found out a solution, which also works in swkfit v2:
Code:
var aso = SharedObject.getLocal("saveGame.myGame.swfkitProject.topcmm", "/");
In the above code, the second parameter of the getLocal method ensures that the shared objects will always be in a same folder even if the path name of the swf movies is changed. However, many programs may save shared objects to the same folder. A longer object name showed in the above code will help avoid name collisions. |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|