Using results from another array

Let’s suppose that I have something like this:

dogs = new Array();
for (var i:int = 1; i <= 30; i++)
{
dogs.push(i);
}

This would produce 30 numbers in an array from 1-30. From there I wish to randomise the array.

function randomiseArray(a:*, b:*):int {
    return 1-Math.floor(Math.random()*2.9999);
}
dogs.sort(randomiseArray);
trace(dogs);

Suppose now I wanted to use only the first 5 numbers of the results in another array - what would be the best way of doing this?

_thanks

Any takers on this?? - it is an interesting one …

var newArray:Array = dogs.slice(0,5);

Just wanted to say that was it - thanks so much EastCoast