Instead of extending Array you could write your own class that exposes all the methods of Array. By employing the Proxy class you can redirect all default Array methods to an internal array but still have the flexibility to add your own methods:
package
{
import flash.utils.flash_proxy;
import flash.utils.Proxy;
use namespace flash_proxy;
dynamic public class ExampleArray extends Proxy
{
private var _array:Array;
public function ExampleArray(...parameters)
{
_array = parameters;
}
override flash_proxy function callProperty( name:*, ...rest):*
{
return _array[name].apply(_array, rest);
}
override flash_proxy function getProperty(name:*):*
{
return _array[name];
}
override flash_proxy function setProperty(name:*, value:*):void
{
_array[name] = value;
}
public function getSmallestElement():*
{
var helper:Array = _array.concat().sort();
return helper[0];
}
}
}
example:
var test:ExampleArray = new ExampleArray(8,7,6,5,4,3,2,1);
trace( test.getSmallestElement()); // 1
test.sort();
trace(test); // 1,2,3,4,5,6,7,8