#include espresso;

Flash, Cookies, and Sockets

Saturday, 1 November, 2008 Posted in:

One of the things I’ve always thought was missing from Flash was access to a browser’s cookies. I can understand the argument that cookie access is unnecessary for sites that are primarily flash based.  After all Flash’s Local Shared Objects make persisting data across sessions or page views fairly painless.  However for hybrid sites where the server passes information to the browser via cookies a developer must jump through a few hoops to get any important data sent from the server via a cookie into Flash.

Read the rest of this entry »

An ActionScript Proxy Event Dispatcher

Sunday, 14 September, 2008 Posted in:

There are times when I need to listen to an object’s event for just a single dispatch and then be done with the listener.  When I’m faced with this situation I tend to want to define the event handler as a closure or an anonymous function as opposed to adding yet another class method to handle the dispatch.  A complication with this approach comes from the fact that I also want to explicitly remove my event listeners for the sake of good garbage collection.  So, to have my cake and eat it to I created a proxy class that takes care of listening to the event and cleaning up after itself once the event has been handled.

Read the rest of this entry »