Reputation: 2228
I'm tasked with updating a Flex project created by an outside contractor and in the Actionscript is the following chunk:
CONFIG::FLASH_10_1
{
//Some code here
}
I've never seen this type of structure before and I'm having a heck of a time trying to search for it on Google - I've found what it means in just about every programming language except AS3. Can anyone shed some light on this?
Upvotes: 3
Views: 2545
Reputation: 19194
Although this is not the same context, to answer the question of what double colon "::" means in AS3...
It is a namespace accessor.
For example, the AS3 Vector.<T>
type actually has a runtime type name of __AS3__.vec::Vector.<T>
, where __AS3__.vec
is the custom namespace. You can also use custom namespaces for members and access them on objects in AS3 using the syntax object.custom_namespace::membername
. public
and private
are built in namespaces, so technically you could access public members like object.public::membername
, as in:
var a:Array = [0,1];
trace(a.public::length); //prints 2
Upvotes: 4
Reputation: 76577
Not a flex / AS3 guru - this thread talks about the '::' being used as a "Namespace accessor":
Upvotes: 2
Reputation: 39408
I'm pretty sure this relates to the conditional compilation features of the Flex compiler.
So, if you add a compiler argument, like this:
-define=CONFIG::FLASH_10_1
I bet that error will go away.
Upvotes: 7