background preloader

Developer

Facebook Twitter

Cleaning up after closures in Flash « Justin J. Moses : Blog. If you haven’t experimented much with closures yet – whether in your Flash/Flex projects, Javascripting or while tinkering with Lua – it’s time to start.

Cleaning up after closures in Flash « Justin J. Moses : Blog

In case you’re a little nervous about those pesky memory leaks in Flash, here are some ways to cope. Much of the following code is bundled into an example Flex project that compares the various closure techniques around a custom Timer class. Check the code on Github. What are closures? Many people think of closures as anonymous functions – probably because that’s the common form they take – but they are more than that. Why use them? They allow the hiding of state (negating the need for maintaining async state in the class) as each closure defines its own variable scope that are available to all nested closures; andBecause they’re easier to follow than continually jumping to functions defined at a type-level. Take a peek Tip: If you find yourself contesting the readability assertion from before, don’t fret – it’s early days. 1. 2. 3. What’s the deal with Signals? « Justin J. Moses : Blog.

Signals.

What’s the deal with Signals? « Justin J. Moses : Blog

Heard of them? What’s the big deal you say? Simple. The event system in AS3 is both limited and antiquated. True, native AS3 events offer a convenient way of messaging (bubbling) withinUI hierarchies. Chiefly, what Robert Penner has done with as3-signals is create a way to represent events as variables, rather than as magical strings firing off at the type (class) level.

General programming

Flex. Wmode / iframe. DOM-javascript cursor. External interface. Culture web flash. Flash security. Ressources on performance in flash. Ergonomie.