The problem is that FLV movie starts playing after full preloading not streaming.
I am passing FLV with PHP script readfile() method.
Can anybody tell me why my player does not start immediately?
Here is the PLAY part of the code
if (mc_play_pause.currentFrame == 1)
{
loader.load(new URLRequest(file));
mc_play_pause.addEventListener(Event.ENTER_FRAME, playHeadMove);
btn_volume.addEventListener(MouseEvent.MOUSE_DOWN, startDragVolume);
}
if (isplaying == false && ispaused == false)
{
isplaying = true;
ispaused = false;
ns.bufferTime = 5;
ns.play(file);
mc_play_pause.gotoAndStop(10);
} else if (ispaused == true && isplaying == false)
{
isplaying = true;
ispaused = false;
ns.resume();
trace("Resumed from: " + ns.time.toString());
mc_play_pause.gotoAndStop(10);
} else if (isplaying == true && ispaused == false)
{
isplaying = false;
ispaused = true;
trace("Paused at: " + ns.time.toString());
ns.pause();
mc_play_pause.gotoAndStop(2);
}