I don't remember all the details, but if I'm not mistaken, those were used in the AS2 days to attach a class to a MovieClip, without
them being linked in the Library (through the Symbol properties).
Google: Object.registerClass and/or __packages
Muzak
----- Original Message -----
From: "Micky Hulse" <mickyhulse.li...@gmail.com>
To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com>
Sent: Wednesday, January 12, 2011 10:08 AM
Subject: [Flashcoders] How to utilize this code: public static const: Needhelp
understanding...
Hello,
Surfing around the net, I found this class:
<http://snipplr.com/view/27981/from-as2-to-as3--where-did-it-go--setrgb--mck/>
The code I would like some help with:
<code>
public class MyClass {
// Public static constants:
public static const CLASS_REF = com.foo.util.MyClass;
public static const CLASS_NAME:String = 'MyClass';
public static const LINKAGE_ID:String = 'com.foo.util.MyClass';
</code>
Note: Among other things, I changed var to const; I assume "const" was
a better pick... No?
So, I understand that a public static const can be accessed from
another class without class initialization, but I don't understand how
the above code could be helpful (other than for meta/documentation
purposes?).
Could someone post an example that shows how/why/when the above
constants could (or, can) be used in the workflow of a project/app?
I hope my question makes sense...
Thanks!
Micky
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders