Search code examples
actionscript-3namespaces

Why would I want to use namespaces in AS3?


I've been taking a look at the use of namespaces in ActionScript 3, and honestly I can't see why they're needed. Does anyone have a convincing example of their use?

I'm also finding them strangely hard to implement.


Solution

  • This is a good write-up on namespaces: http://gskinner.com/blog/archives/2010/01/a_complete_guid.html

    I avoid using them in my own code... but sometimes I need to use them when working with framework classes employ them. For instance, ObjectProxy uses them.

    They seem like a quirk of the language to me... and they seem like they are used to get around limitations of the language. (see comment below)