# (XML slideshow) Scaling problem

**URL:** <https://forum.kirupa.com/t/xml-slideshow-scaling-problem/233427>\
**Category:** flash\
**Created:** [July 23, 2007, 10:37pm UTC](https://forum.kirupa.com/t/xml-slideshow-scaling-problem/233427 "2007-07-23T22:37:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vectar](https://avatars.discourse-cdn.com/v4/letter/v/b2d939/32.png) [@Vectar](https://forum.kirupa.com/u/Vectar)\
**Post date:** [July 23, 2007, 10:37pm UTC](https://forum.kirupa.com/t/xml-slideshow-scaling-problem/233427/1 "2007-07-23T22:37:30Z")

</div>

I am using the XML slideshow file from kirupa.  
[http://www.kirupa.com/developer/mx2004/xml\_slideshow.htm](http://www.kirupa.com/developer/mx2004/xml_slideshow.htm)  
I basically didn’t change anything in the file yet, now i want to make the images be scaleable to the screen size. The imagecontainer in the file has a instance name called picture. Now i made the background scale allready and now i want the image to do something the same as the background but when i add the script the image disappears.  
Does somebody know what i am doing wrong in the script ?  
for now i only tested the screen width scaling.  
Can somebody please help me out ???

```auto
Stage.align = "TL";
Stage.scaleMode = "noScale";
stop ();

background._x = 7;
background._y = 7;
ratio = background._width/background._height;
background._width = Stage.width-14;
background._height = (background._width/ratio);
picture._width = Stage.width;

sizeListener = new Object();
sizeListener.onResize = function() {
    background._x = 7;
    background._y = 7;
    ratio = background._width/background._height;
    background._width = Stage.width-14;
    background._height = (background._width/ratio);
    picture._width = Stage.width;
};

```
