Recent posts by sarahnorthway on Kongregate

Flag Post

Topic: Game Programming / ReferenceError #1069 in kongregate.services

According to reports I’m getting an intermittent “ReferenceError: Error #1069” (property PROPERTY_NAME not found on CLASS_NAME) on a guest user running Flash 11.5 when calling this:

if (kongregate.services.isGuest()) {
kongregate.services.showRegistrationBox();
}

I can’t recreate it or determine what PROPERTY_NAME or CLASS_NAME it’s talking about. Has anyone else run into this? Is it possible that some version of the api could be missing .services or some internal component?

 
Flag Post

Topic: Game Programming / Don't change filename when uploading a new version!

I’m setting this up for my next game and have all the facts now:

You can only set the SharedObject path to locations along the swf’s actual hosted path. So in the case of my game at http://chat.kongregate.com/gamez/0010/4677/live/Rebuilder_-kong_15.swf, I could set the path to “/” which is accessible by all other swfs on Kongregate. I peeked at my files in that location and saw “analytics.sol” (bad name, because some other game might accidentally overwrite it), and "SteamBirdsSurvival.sol" (much better name). Like Draco said, Mardek probably keeps some files there and others in a more private place.

Or I could set the path to “/gamez/0010/4677” which is only accessible to live and preview versions of my game (id 104677) no matter what the filename. But this would break if the swf were hosted on some other site or moved from /gamez/, so I’d have to check for that and use the default location in that case. Too much work imo so I’m going to use “/” from now on.

Another good site with examples of using SharedObjects:
http://www.permadi.com/tutorial/flashSharedObject/index.html

 
Flag Post

Topic: Game Programming / Don't change filename when uploading a new version!

Yeah, if I’d caught it in time I could have renamed the file back, but if I do it now I’ll be losing too many new saves. As far as I know, there’s no way for my game to access both sets of local data, so effectively the savegames for the original version are gone forever unless each player manually copies them to the new location.

Setting the savefile path in SharedObject.getLocal from the start is an interesting idea, though it does mean any other game on Kongregate could mess with my save data. But if I understand right, the default local storage location (the swf’s path) is special and can’t be accessed by any other swf ever, so my new version can never access the old one’s data.

For the record, local storage for my game seems to be:
C:\Users\[user]\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\[numbers]\chat.kongregate.com\gamez\0010\4677\preview\Rebuilder_-_kong_15.swf

Vara has a point about preloaders possibly referencing filename, though some other portals do rename files. Nonetheless it wouldn’t hurt to show the original filename and a warning if the new filename differs.

 
Flag Post

Topic: Game Programming / Don't change filename when uploading a new version!

I just uploaded a new version of my game and everyone’s savegames disappeared. This was definitely not intentional, and I realized what happened too late: Kongregate doesn’t rename the swf files you upload, so my first swf was called something like “Rebuild-14.swf” and my second was “Rebuild-15.swf” because this is how I organize versions. The two have separate cookies so everyone got a clean slate when the new version went live.

I expected Kong to rename both files for me automatically to prevent this – be warned that they do not, and their upload system doesn’t warn you when you’re about to nuke everyone’s cookies!