# Simple level help?

**URL:** https://forum.kirupa.com/t/simple-level-help/215505
**Category:** flash
**Created:** [February 7, 2007, 7:54pm UTC](https://forum.kirupa.com/t/simple-level-help/215505 "2007-02-07T19:54:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![East\_High](https://avatars.discourse-cdn.com/v4/letter/e/6de8d8/32.png) [@East\_High](https://forum.kirupa.com/u/East_High)
#### Post date: [February 7, 2007, 7:54pm UTC](https://forum.kirupa.com/t/simple-level-help/215505/1 "2007-02-07T19:54:29Z")

</div>

I’m using xml to load .flvs into a movie player. I have it setup to load an external .swf to level 1 when the movie is finished. My goal is to have the .swf on level 1 select the next .flv from the xml array by way of simple buttons. Needless to say, it’s not working. Anyone care to give it a crack?

```auto

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.setBufferTime(10);
myVideo.attachVideo(ns);
/////////XML/////////////
var vlist:XML = new XML();
vlist.load("video.xml");
vlist.ignoreWhite = true;
vlist.onLoad = function() {
    var videos:Array = this.firstChild.childNodes;
    for (i=0; i<videos.length; i++) {
        ns.play(videos[0].attributes.url);
    }
};
path = "logos/";
ns.onStatus = function(object) {
    if (object.code == "NetStream.Play.Start") {
    } else if (object.code == "NetStream.Play.Stop") {
        loadMovieNum(path+"logo.swf", 1);
    }
};

```

Code for the \_level1 .swf

```auto

logo_mc.onPress = function() {
    _level0.ns.play(videos*.attributes.url);
};

```

XML Code

```auto
<?xml version="1.0" encoding="ISO-8859-1"?>
    <videos>
    <video url="flvs/Heartattacktest_Gerad.flv" />
    <video url="flvs/part1.flv" />
    <video url="flvs/Part_2_Final10906.flv" />           
    </videos>    

```
