# Netstream complete event

**URL:** <https://forum.kirupa.com/t/netstream-complete-event/324063>\
**Category:** Uncategorized\
**Created:** [July 31, 2011, 3:45am UTC](https://forum.kirupa.com/t/netstream-complete-event/324063 "2011-07-31T03:45:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![izzo101](https://avatars.discourse-cdn.com/v4/letter/i/c6cbf5/32.png) [@izzo101](https://forum.kirupa.com/u/izzo101)\
**Post date:** [July 31, 2011, 3:45am UTC](https://forum.kirupa.com/t/netstream-complete-event/324063/1 "2011-07-31T03:45:12Z")

</div>

I have been looking for help everywhere for this. I need a little help. I am creating a kiosk and have 7 movies playing when a clicked. The intro video (flv/intro.flv) runs from start and I want that to loop. I also want all the other videos to return to the intro video after they have completed.

Can someone take a look at this code and without just telling me I need to use a different netstream or onplaystatus, give an example of how I can make these two events happen. I figured the loop, but making the others return to intro is really difficult.

```auto
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);

var metaDataListener:Object = new Object();
metaDataListener.onMetaData = function(meta:Object){
}

ns.client = metaDataListener

var myVideo:Video = new Video(800, 600);
myVideo.x = 0;
myVideo.y = 0;
addChild(myVideo);
setChildIndex(myVideo, 0);
myVideo.attachNetStream(ns);

ns.play("flv/intro.flv");

duetBTN.addEventListener(MouseEvent.CLICK, playVideo1);
vantageBTN.addEventListener(MouseEvent.CLICK, playVideo2);
cabrioBTN.addEventListener(MouseEvent.CLICK, playVideo3);
classicBTN.addEventListener(MouseEvent.CLICK, playVideo4);
laundryBTN.addEventListener(MouseEvent.CLICK, playVideo5);
resourceBTN.addEventListener(MouseEvent.CLICK, playVideo6);
industryBTN.addEventListener(MouseEvent.CLICK, playVideo7);
homeBTN.addEventListener(MouseEvent.CLICK, playVideo8);

function playVideo1(e:MouseEvent):void {
    ns.play ("flv/duet.flv");
}

function playVideo2(e:MouseEvent):void {
    ns.play("flv/vantage.flv");
}

function playVideo3(e:MouseEvent):void {
    ns.play("flv/cabrio.flv");
}

function playVideo4(e:MouseEvent):void {
    ns.play("flv/classic.flv");
}

function playVideo5(e:MouseEvent):void {
    ns.play("flv/laundry.flv");
}

function playVideo6(e:MouseEvent):void {
    ns.play("flv/resource.flv");
}

function playVideo7(e:MouseEvent):void {
    ns.play("flv/industry.flv");
}

function playVideo8(e:MouseEvent):void {
    ns.play ("flv/intro.flv");
}

```
