Browsing the archives for the AS3 category

Motherfucking AS3 Garbage Collection

I like to think that I’m a responsible developer. I make good constructors and deconstructors to prevent memory leaks, I have fairly secure coding habits, I OOP the hell out of everything, and I do everything by-the-book. Imagine my frustration, then, when all of my games (particularly my latest, Steambirds) have gigantic memory leaks. Like, [...]

43 Comments

Decimal or Integer to Binary / AS3 Code

I had a need for this routine in Protonaut, and Ryan Madsen was gracious enough to pseudo-code this up for me. I then converted it to proper AS3 and to suit protonaut’s needs. It’s modifiable easily enough, but here’s the basic premise: Input a decimal (say, the number 1) and request an array length in [...]

0 Comments

FlexSDK 3.3 How To Make a Flash PreLoader in AS3

EDIT: The free code-IDE FlashDevelop does a really good job of doing all these steps for you! I recommend everyone switch to it. :) One of the things that has been vexing me lately is trying to get a Flash PreLoader working for my games. I’ve tried Googling it, but there are too many like-terms: [...]

4 Comments

MXMLC Ruins FileSizes

While working on Build 45 today I noticed something – that my file size for the project had almost hit 200KB. That’s a lot of KB. And considering a pretty big chunk of the population in the US is still on Dialup, it’s an unacceptably large number of KBs. It was taking 2-5 seconds to [...]

1 Comment

The Art of Sticking to the Plan

So I ran into a lot of trouble with Flash yesterday. Seems that compiling from the Flex SDK (mxmlc.exe) produces different results from most compilations in any sort of framework. Great example; var a:Number = 1/3; var b:Number = 1.0/3.0; In MXMLC, VariableA is equal to 0, and B is 0.3333. In IDEs (Flash, FlashStudio, [...]

0 Comments