How to get random values from xml array without repeating?

Hi, all, I am importing video playlist using xml. As soon as one video is done, I pick up next random video from the xml list of videos.
Lets say I have 5 videos in that list - getting random numbers from 5 would look like so:
1 , 3, 1, 4, 3, 3, 3, 2, 5, 2, 2, 2, 3, 4, 5, 3, 3, 2
but I really want to have something like this:
4, 2, 5, 3, 1
The problem becomes apparent - the random numbers are repeating. I guess I would have to create some sort of loop to go through xml and get random number and then not repeat it. Any ideas how to make this work.
Here is my xml (just 5 videos for example):

<?xml version="1.0" encoding="UTF-8"?>
<data dir="video/">
    <video src="video-0.flv"></video>
    <video src="video-1.flv"></video>
    <video src="video-2.flv"></video>
    <video src="video-3.flv"></video>
    <video src="video-4.flv"></video>
</data>

and relevant AS part, which is pulling in videos from xml list:


var total:Number = xml.video.length();
var randomNum:uint = 0;

var nc:NetConnection = new NetConnection();
nc.connect(null);

var ns:NetStream = new NetStream(nc);
ns.play("video/" + xml.video.@*[randomNum]);

function onNetStatus(e:NetStatusEvent) {
    switch (e.info.code) {
        case "NetStream.Play.Stop" :
            randomNum = Math.floor(Math.random()*total);
            ns.play("video/" + xml.video.@*[randomNum]);
            break;
    }
}

Any ideas?
Thanks!