BTW, this is the falling blocks flash game I mentioned in my previous post. (click to play)

May 24th, 2008 | Tags: | Category: Flash Game |


I know this is supposed to be an art blog, but as soon as you introduce a computer, the lines between art and engineering start to get blurred. Regardless, I found this Flash AS3 Memory Leak to be such a landmine that I just had to post it somewhere for other people to hopefully find and breath a sigh of relief when they realize why their flash game slows down and grinds to a halt the longer they play it.

Okay, no beating around the bush. Do this code once a frame (or more!) and you’re flash game will grind to a halt.

mySprite.graphics.beginFill( 0xFFFFFF );
mySprite.graphics.drawRect( vPos.x, vPox.y, vSize.x, vSize.y );
mySprite.graphics.endFill();

This was my “DrawBlock” function for my falling blocks game. I see these three lines posted all over the web in tutorial and in forums. –Worse, I often only see the first two lines and no endFill(). The above code eats memory.

(more…)

May 24th, 2008 | Tags: | Category: Flash Game, Observation |

Here’s a link to the game.

February 18th, 2008 | Tags: | Category: Danny's Comic Journal, Games |

« Newer Posts