I was working on a project to optimize the file size of a published .SWF file today. I wasn’t able to reduce the size of my file by that much, but at the same time I was removing assets from the Library of the source .FLA file. I noticed that after saving, the file size of the .FLA was not decreasing. I started to doubt my sanity, so I decided to see what Google had to say on the subject.
I found this helpful blog post on the subject.
Basically, when using Ctrl+S to save a file, the Flash IDE does a quick save. This quick save, doesn’t do anything to optimize the size of the .FLA file. However, if you use the File > Save and Compact command, Flash will compact the file for you.
However, be warned that saving in this way will remove the undo history for the file. So any changes you’ve made since you opened the file will not be recoverable.
stringParameter = stringParameter.replace(/n/g, " ");
stringParameter = stringParameter.replace(/r/g, " ");
stringParameter = stringParameter.replace(/\/g, "\\");
Mochi Mochi has released a new feature through their MochiAds service called “Leaderboards”. I’m still busy working on my next game, so I probably won’t integrate the new leaderboards into Cubical and Tetrical any time soon, but I eventually will. I’ll also be using them heavily in the new game. The leaderboards are very cool looking and at first glance appear to be very easy to create and use. Documentation can found here.
For those of you that like the ability to create abstract classes, zeuslabs has written an interesting hack to mimic the behavior in ActionScript 3 (AS3).
Runtime Enforcement of Abstract Classes in AS3
Kongregate as finally released an AS3 version of their API. There are two methods to integrate the API with your game. The first method is to download a component and compile it into your game. The second method is to load the API at runtime.
As easy as it is to integrate with the Kongregate API through their component, I prefer to do as much as I can through ActionScript without using the Flash IDE. Also, if you are a game developer that posts your game to multiple portals with their own APIs, you may want to only include the API for each domain as needed.