Hello there, I'm wondering if is there any way to mimic the same behaviour we have for top level classes in AS3 for example:
var myArray:Array = [1,2,3,4];
trace(myArray) // [1,2,3,4];
As you can see it returns the own object when tracing it.
but if I create my own class that extends Array
I get
var queue:Queue = new Queue([1,2,3,4]);
trace(queue) // no output
so there are 2 questions here.
is it possible to create a custom class instance just like I create an Array like:
var queue:Queue = [1,2,3,4];
//instead
var queue:Queue = new Queue([1,2,3,4]);
and how can I return the super object when asking for the object like;
trace(queue) // [1,2,3,4];
I'm not sure if this is possible to do in AS3
thanks for you help