dynamic class & property
Hi there!
I would like to know, if it is possible to mimic the behavior of XML dynamic class:
var xm:XML =
<question idAttr="atribute xml">
</question>;
trace(xm.attributes());
trace("Attributes: "+xm["attributes"]);
xm["attributes"] = {a:"atr1", b:"atr2"}; (in my dynamic class with attributes function, I get ReferenceError: Error #1037)
trace("Attributes: "+xm["attributes"]);
trace(xm.attributes());
So I can call:
xm.attributes() method which gives me XML attributes
and use
xm["attributes"] = {a:"atr1", b:"atr2"};
which writes to the "attributes" property and not references the XML class function.
My question:
How can I do the same in my custom dynamic class ?
Gregory