Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-13-2006, 02:33 AM
Junior Member
 
Join Date: Jul 2006
Posts: 1
Default SOS: help with packing

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;
}
Reply With Quote
  #2 (permalink)  
Old 07-13-2006, 09:14 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:SOS: help with packing

You cannot pack the swf files if you want to use Shared objects in the current version. Only v3 can resolve this problem.
Reply With Quote
  #3 (permalink)  
Old 07-19-2006, 04:20 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:SOS: help with packing

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 shared object will be saved into an unchanged folder. The reason that shared objects cannot work in packed movies is that the packed movies are extracted to different folders every time you launch the program, and normally the shared objects correspond exactly to the path name of the swf movies.

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.
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:47 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.