A major reason why some users of my EventManager class may see more memory leaks being shown than actual memory leaks is because EventManager stores all the listeners in a dictionary. If we remove a display object then technically (if weakReference is set to true) the listeners are removed for the DisplayObject and its children. Until today, [...]
EventManager Class Update
Hate keeping track of event listeners? Wish you had removeAllListeners()? Wish you had removeAllListeners(EventDispatcherWithABunchOfListeners)? Wish you could remove all listeners that targetted a specific function? A while ago I posted a class I wrote to handle actionscript 3 listeners. I updated EventManager.as today to by default set weakReference to true and to always add the listener [...]
AS3 Primitives
*Edit: I have found that I am wrong about the following (as shown from the comments). In AS3, numbers are in fact placed in their wrapper classes. My interpretation are wrong. You can keep read the following if you want to know how it DOESN’T work. Basically what I describe is how Java works. AVM2 [...]
AS3 EventManager Class: removeAllListeners
I heard about a class that Grant Skinner wrote called Janitor that was supposed to help keep track of listeners, but I couldn’t find it. Consequently, I wrote my own “EventManager” class for a gaming project I’m working on which keeps track of Event listeners in a project. As all Actionscript 3 developers know, one [...]
Astro (Flash Player 10) Beta Released!
Here are some highlighted features of the new player (a list by Adobe can be found on their labs page) Adobe has finally made noise (read introduction material parts 1, 2, 3 by Adobe Engineer Tinic Uro). Keith Peters (who is one of the lucky few to have a version of Adobe’s upcoming authoring tool) [...]
Jacobi Algorithm in AS3
Recently, my “Calculus for Computer Science” teacher assigned the following problem. So to complete this assignment, I decided to use Actionscript 3 and Flash. A friend of mine and I at Georgia Tech are developing a complex open source matrix library called as3matrix, and we were planning on implementing Jacobi to find eigenvectors of a [...]
A Few Things You May Not Know About CacheAsBitmap
cacheAsBitmap is a feature in Flash (since Flash that tells the Flash Player to store a movieclip of vectors into one static instance in memory. It’s a great way to boost the performance of your Flash. But I’m writing about how to use cacheAsBitmap (you can just google that). Some things you may never knew [...]
Flash Player 9r45 Weird Behavior
So I was working on the sequel to Boomshine this week, and for some bizarre unexplainable reason, the file SWF perfectly in Flash Player 9 r45; however, if I dropped down to Flash Player 9 r28 (or anything lower), the Flash wouldn’t work at all! I looked at the change log for r28 to r45 [...]