Comparing numbers in an Array

I’m trying to write a script which gets the current time and then checks through a bus schedule and lets the user know when the next 2 or 3 buses are scheduled. I thought I could put the bus schedule into an array and compare the current time with the time values in the array, but I can only access the array by the index numbers, not by the actual time values. Is there a way to get at those time values directly?

To simplify things I’m initially working with an array of ten consecutive numbers (1 to 10) to represent the bus times and then trying to get the 3 numbers after 5. I’ve got 3 fat books on Actionscript and can’t find any reference to this, so perhaps it can’t be done in this way. I’d appreciate any thoughts on this.

Cheers,
Cliff