I'm trying to stream a sequence of small FLV files using PHP and MING library. The SWF file is generated by PHP dynamically on the server, so the video playlist can be updated. I'm new to ActionScript and don't know how to make video2.flv play after video1.flv plays to the end in the following example. When I run the resulting SWF file video2 starts to play right away. Is there any way to fix it? $movie = new SWFMovie(7);
$movie->setDimension(320,240);
$movie->setBackground(0,0,0);
$movie->setRate(8);
$strAction = "
stop();
netConn = new NetConnection();
netConn.connect(null);
vStream = new NetStream(netConn);
video1.attachVideo(vStream);
vStream.setBufferTime(5);
vStream.play('http://localhost/video1.flv');
vStream.play('http://localhost/video2.flv');";
$stream = new SWFVideoStream();
$item = $movie->add($stream);
$item->setname("video1");
$movie->add(new SWFAction($strAction));
$movie->nextFrame();