In ActionScript, a namespace is a qualifier for the name of a
variable, method, XML tag, or XML attribute. A qualifier limits, or "qualifies" the
meaning of an identifier, giving us the ability to say in code "this
orange variable is a fruit, not a
color" or "this search( ) method
applies to Japanese language searching, not English" or "this
<TABLE> tag describes HTML page
layout, not a piece of furniture."
Using ActionScript namespaces to qualify variable and method names we can:
Prevent naming conflicts (see the section "Namespaces for Access-Control Modifiers")
Implement custom levels of method and variable visibility
across an entire program, independent of the program's package
structure (see the
namespace example, in the section "Example: Framework-Internal Visibility")
ActionScript namespaces also provide direct access to XML namespaces in XML documents. For coverage of XML namespaces in ActionScript see the section "Working with XML Namespaces" in Chapter 18.