Showing posts with label Singleton. Show all posts
Showing posts with label Singleton. Show all posts

December 28, 2006

Singleton in ActionScript 3.0

There are some ways to create singleton in ActionScript 3.0, though I prefer public "facade" with static initialization of internal class:

Internal class (it should be in the same package with "facade"):

Usage example: