# Banging Head on Wall

**URL:** <https://forum.kirupa.com/t/banging-head-on-wall/231331>\
**Category:** flash\
**Created:** [July 3, 2007, 8:07pm UTC](https://forum.kirupa.com/t/banging-head-on-wall/231331 "2007-07-03T20:07:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![doctorNo](https://avatars.discourse-cdn.com/v4/letter/d/d26b3c/32.png) [@doctorNo](https://forum.kirupa.com/u/doctorNo)\
**Post date:** [July 3, 2007, 8:07pm UTC](https://forum.kirupa.com/t/banging-head-on-wall/231331/1 "2007-07-03T20:07:51Z")

</div>

I’ve been working on this for sometime, and I am starting to clench my teeth…Could someone take a look at this and tell me why if I substitute \* with [1] I can get the next image to pop in to the loader, but otherwise I get error 2007: Parameter url must be non-null…

```auto
var imageContainer:Loader=new Loader();

addChild(imageContainer);

var loader:URLLoader=new URLLoader();
loader.addEventListener(Event.COMPLETE, xmlLoaded);

var request:URLRequest=new URLRequest("images.xml");
loader.load(request);

function xmlLoaded(event:Event):void{
    var xml:XML=new XML(loader.data);
    trace(xml.pic[0]);
    var picRequest:URLRequest=new URLRequest(xml.pic[0]);
    var picLength:Number=xml.pic.length();
    var picLoader:Loader=new Loader();
    picLoader.x=picLoader.y=50;
    this.addChild(picLoader);
    picLoader.load(picRequest);
    var myTimer:Timer = new Timer(5000,2);
    myTimer.addEventListener(TimerEvent.TIMER, nextImage);
    myTimer.start();
    function nextImage():void{
        picLoader.unload();
        for(var i:int=0; i<=picLength; i++){    
            var nextPicRequest:URLRequest=new URLRequest(xml.pic*);
            picLoader.load(nextPicRequest);
        }
    }
}

```

thanks.
