Is it possible to make a dynamic class in AS3 only accept dynamically created properties if they're a given type?
For example, I may only want Sprites to be allowed. So take this quick example class:
public dynamic class Test extends Object{}
-------
And a few quick lines to get an idea of what I mean:
var test:Test = new Test();
test.something = 32; // error
test.something = "party hats"; // error
test.something = new Sprte(); // works
Maybe using the proxy class/namespsace there's a way to manipulate whatever is run when creating variables dynamically?