Hello all,

Is it possible to reference a constant in an XML attribute (or the node itself)?
Meaning if I have a class with some defined constants like:
ActionScript Code:
    public class MyConstants {
        public static const CONSTANT1:String = "Goodbye";
        public static const CONSTANT2:String = "Cruel";
        public static const CONSTANT3:String = "World";
        public function MyConstants() {
In a separate class, I would like to be able to insert a reference to those constants into an XML object's attributes like:
ActionScript Code:
var my_xml:XML =
<someNode attr1="MyConstants.CONSTANT1" attr2="MyConstants.CONSTANT2" attr3="MyConstants.CONSTANT3">
    Here is an XML element.
However, the results I get when I trace are:
ActionScript Code:
trace(my_xml.@attr1); // output: MyConstants.CONSTANT1
trace(my_xml.@attr2); // output: MyConstants.CONSTANT2
trace(my_xml.@attr3); // output: MyConstants.CONSTANT3
Which is what I expected, but is there any way to actually get the constant's value:
ActionScript Code:
trace(my_xml.@attr1); // output: Goodbye
trace(my_xml.@attr2); // output: Cruel
trace(my_xml.@attr3); // output: World
And, if tracing the constant's value is possible... I assume I could make something like this would work too?
ActionScript Code:
addEventListener(my_xml.@attr1, eventHandler, false, 0, true);