# Papervision

**URL:** <https://forum.kirupa.com/t/papervision/307920>\
**Category:** Uncategorized\
**Created:** [April 13, 2010, 3:11pm UTC](https://forum.kirupa.com/t/papervision/307920 "2010-04-13T15:11:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![surf](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@surf](https://forum.kirupa.com/u/surf)\
**Post date:** [April 13, 2010, 3:11pm UTC](https://forum.kirupa.com/t/papervision/307920/1 "2010-04-13T15:11:56Z")

</div>

Hi… how can u set it so tht it reads the images for gallery from xml for the code below  
i can create the carosel but loading the images from the xml is getting tricky…  
what i am doing here is loading xml… and pushing the images as materials to plane into an array that i can populate later on… but its not workin  
if there is a better way then u have to let me know …

```php

private function loadXML() : void
        {
            loader = new URLLoader(new URLRequest("images.xml"));
            loader.addEventListener(Event.COMPLETE, createCarousel);
            loader.addEventListener(ProgressEvent.PROGRESS, preLoader)
        }
    private function createCarousel(e : Event) : void
        {
            var xml : XML = new XML(e.target.data);
            var list : XMLList = xml.image;
            anglePer = (Math.PI * 2) / list.length();
            for(var i : int = 0;i < list.length();i++)
            {
                var bmpMaterial : BitmapFileMaterial = new BitmapFileMaterial(list*.@src);
                ar.push(bmpMaterial)
                
            }

        }

```

thanks
