Comments on: Packages are actually namespaces in ActionScript 3 https://joshblog.net/2009/05/13/packages-are-actually-namespaces-in-actionscript-3/ Archive of older blog posts written by Josh Tynjala about Flash, Flex, and ActionScript Wed, 26 Jun 2013 02:52:46 +0000 hourly 1 https://wordpress.org/?v=4.9.9 By: Josh Tynjala https://joshblog.net/2009/05/13/packages-are-actually-namespaces-in-actionscript-3/#comment-19968 Fri, 04 Nov 2011 16:48:56 +0000 http://joshblog.net/?p=611#comment-19968 I think you misunderstood the point of this post, sydd. It wasn’t to introduce namespaces in their typical usage (like how Flex classes use mx_internal). Instead, it shows how a very core part of ActionScript 3, namely packages, is actually using namespaces behind the scenes. Many developers don’t realize that.

One more thing, sydd. Rather than calling $addChild(), you should use rawChildren.addChild(). It’s a fully supported public API that is designed for the same thing that you’re trying to do.

]]>
By: sydd https://joshblog.net/2009/05/13/packages-are-actually-namespaces-in-actionscript-3/#comment-19966 Fri, 04 Nov 2011 15:27:32 +0000 http://joshblog.net/?p=611#comment-19966 You can benefit from this, if you use Flex: Flex uses an namespace called mx_internal to hide stuff from the user. If you use the mx_internal namespace, you can access these hidden properties of Flex components. For example i love to use mx_internal::$addChild method – its for adding a non-Flex child to a Flex component. Since you add it directly, Flex wont do anything to this component.

Basically Adobe uses this namespace thing to hide functions in a class without making them private.

]]>
By: Get the class used to create an object instance in AS3 « Josh Talks Flash https://joshblog.net/2009/05/13/packages-are-actually-namespaces-in-actionscript-3/#comment-6798 Thu, 07 Apr 2011 18:53:08 +0000 http://joshblog.net/?p=611#comment-6798 […] that :: part of the fully-qualified class name? Shouldn’t it be . instead? Check out my post Packages are actually namespaces in ActionScript 3 to learn […]

]]>