I have five video file like video-1.flv, video-2.flv, video-3.flv, video-4.flv, video-5.flv. I read first video-1.flv and store it in a byteArray using the code below:
private var byteArray = new byteArray();
byteArray = readFile(VIDEO-FILE-PATH);
private function readFile(fileName:String):ByteArray
{
var data:ByteArray = new ByteArray();
var inFile:File = File.applicationDirectory; // source folder is application
inFile = inFile.resolvePath(fileName); // name of file to read
var inStream:FileStream = new FileStream();
inStream.open(inFile, FileMode.READ);
inStream.readBytes(data, 0, data.length);
inStream.close();
return data;
}
Now I want to read and store the next videos from video-2.flv to video-5.flv in the same byteArray.
How can I do this. Any code sample or web link would be appreciated.