AS3: My favorite example of Singleton


/ Published in: ActionScript 3
Save to your folder(s)

There are a variety of ways to create a Singleton in AS3 but because Adobe wants to be ECMA compliant, there's no way to do it (like in Java) using a private constructor. Writing a singleton this way will give you a runtime warning if something goes wrong.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.