Is the following what you would like to do?
http://www.fumiononaka.com/TechNotes/Flash/FN0703001.html
*Sorry, the article is in Japanese.
package {
dynamic public class MyArray extends Array {;
public function MyArray(...args) {
if (args.length == 1 && !isNaN(args[0])) {
this.length = args[0];
} else {
push.apply(this, args);
}
}
}
}
_____
Sidney de Koning wrote:
If i push my values; my class returns that current item, if i pass it
through the constructor i get back an array.
I want to be able to do both; push items seperately and pass through an
whole array in its constructor.
Is there something i can like super.apply(this, args) ?
public dynamic class ArrayIterator extends Array
{
//
protected var _index:int;
public function ArrayIterator(...args)
{
super(args);
_index = 0;
}
What am i doing wrong here and what can i do to solve this?
--
Fumio Nonaka
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.com/
My books<http://www.FumioNonaka.com/Books/index.html>
Flash community<http://F-site.org/>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders