# Full Browser images with XML

**URL:** <https://forum.kirupa.com/t/full-browser-images-with-xml/234184>\
**Category:** flash\
**Created:** [July 31, 2007, 10:32am UTC](https://forum.kirupa.com/t/full-browser-images-with-xml/234184 "2007-07-31T10:32:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Crasher](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@Crasher](https://forum.kirupa.com/u/Crasher)\
**Post date:** [July 31, 2007, 10:32am UTC](https://forum.kirupa.com/t/full-browser-images-with-xml/234184/1 "2007-07-31T10:32:04Z")

</div>

Hi People

I want want to create a gallery where the images fill up the entire Browser window.  
Here is what I got so far

```php
Stage.scaleMode = "noScale";
Stage.align = "TL";
import flash.display.*;

stop();
var sl:Object = new Object();
sl.onResize = function() {
    preloader._width = Stage.width;
    preloader._height = 2;
    preloader._x = 0;
    preloader._y = 0;
};
sl.onResize();

preloader.bar._xscale = 0;
function loadBitmapSmoothed(imageURL:String, target:MovieClip) {

    var bmc:MovieClip = target.createEmptyMovieClip("bmc", target.getNextHighestDepth());
    var listener:Object = new Object();
    listener.tmc = target;
    listener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
        percent = Math.round((bytesLoaded/bytesTotal)*100);
        loadProgress = bytesLoaded/bytesTotal*Stage.width;
        preloader.bar._width = Math.round(loadProgress);
        mcPer._x = loadProgress-2;
        mcPer._y = 5;
        mcPer.txtPer.text = percent;
        preloader.bar._xscale = percent;
        if (bytesLoaded == bytesTotal) {

        }
    };
    listener.onLoadInit = function(mc:MovieClip) {
        mc._visible = false;
        var bitmap:BitmapData = new BitmapData(mc._width, mc._height, true);
        this.tmc.attachBitmap(bitmap,this.tmc.getNextHighestDepth(),"auto",true);
        bitmap.draw(mc);
        if (Stage.height/Stage.width>target._height/target._width) {
            img_prop = target._width/target._height;
            target._height = Stage.height;
            target._width = Stage.height*img_prop;
            target._y = (Stage.height/2)-(target._height/2);
            target._x = (Stage.width/2)-(target._width/2);
        } else {
            img_prop = target._height/target._width;
            target._width = Stage.width;
            target._height = Stage.width*img_prop;
            target._y = (Stage.height/2)-(target._height/2);
            target._x = (Stage.width/2)-(target._width/2);
        }
    };
    var loader:MovieClipLoader = new MovieClipLoader();
    loader.addListener(listener);
    loader.loadClip(imageURL,bmc);
}

loadBitmapSmoothed("myimage.jpg", bg_con)

var stage_listener:Object = new Object();
stage_listener.onResize = function():Void {
    if (Stage.height/Stage.width>bg_con._height/bg_con._width) {
        img_prop = bg_con._width/bg_con._height;
        bg_con._height = Stage.height;
        bg_con._width = Stage.height*img_prop;
        bg_con._y = (Stage.height/2)-(bg_con._height/2);
        bg_con._x = (Stage.width/2)-(bg_con._width/2);
    } else {
        img_prop = bg_con._height/bg_con._width;
        bg_con._width = Stage.width;
        bg_con._height = Stage.width*img_prop;
        bg_con._y = (Stage.height/2)-(bg_con._height/2);
        bg_con._x = (Stage.width/2)-(bg_con._width/2);
    }
};
Stage.addListener(stage_listener);

```

How can I use an XML file to get the images from?

Thanks in advance  
Crasher
