# Video Player with XML problem \[AS2\]

**URL:** <https://forum.kirupa.com/t/video-player-with-xml-problem-as2/226690>\
**Category:** flash\
**Created:** [May 23, 2007, 4:47am UTC](https://forum.kirupa.com/t/video-player-with-xml-problem-as2/226690 "2007-05-23T04:47:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![this](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/this/32/669_2.png) [@this](https://forum.kirupa.com/u/this)\
**Post date:** [May 23, 2007, 4:47am UTC](https://forum.kirupa.com/t/video-player-with-xml-problem-as2/226690/1 "2007-05-23T04:47:37Z")

</div>

Hello. im working with a flv player and when i teste my movie result a “sand box” error:  
this is my code:

```auto

var nc_video:NetConnection = new NetConnection();
nc_video.connect(null);
var ns_video:NetStream = new NetStream(nc_video);
ns_video.setBufferTime(3);
video.myVideo.attachVideo(ns_video);

function setVideo(vidSource:String):Void {
    ns_video.play("Videos/" + vidSource);
};

//

var xd:XML = new XML();
xd.ignoreWhite = true;
xd.onLoad = xdLoaded;
xd.load("videoList.xml");

function xdLoaded() {
    
    function rodaVideo(nunVid:Number):Void {    
        
        var sourceVideo:String = xd.childNodes[0].childNodes[nunVid].childNodes[1].firstChild;        
        setVideo(sourceVideo);
        
    };
    
    rodaVideo(0);
    
};

//

stop();

```

The video run fine but show the sand box error:

> 

\*\*\* Security Sandbox Violation \*\*\*  
Connection to null halted - not permitted from file:///C|/Documents%20and%20Settings/.Pablo.CASA.000/Desktop/wtv/wtv.swf

Anyone know anything about it ? Need some help to fix it.  
Tks in advance.
