# Sclaing issues

**URL:** <https://forum.kirupa.com/t/sclaing-issues/141329>\
**Category:** Uncategorized\
**Created:** [March 18, 2005, 10:14pm UTC](https://forum.kirupa.com/t/sclaing-issues/141329 "2005-03-18T22:14:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![c03cg](https://avatars.discourse-cdn.com/v4/letter/c/958977/32.png) [@c03cg](https://forum.kirupa.com/u/c03cg)\
**Post date:** [March 18, 2005, 10:14pm UTC](https://forum.kirupa.com/t/sclaing-issues/141329/1 "2005-03-18T22:14:09Z")

</div>

Im trying to scale images within the XML photogallery (as in the tutorial), the pictures are being rotated by 90 degrees and being scaled… can sort it out!!

```auto
 p = 0; 
this.onEnterFrame = function() 
{ 
filesize = picture.getBytesTotal(); 
loaded = picture.getBytesLoaded(); 
preloader._visible = true; 
if (loaded != filesize) 
{ 
	preloader.preload_bar._xscale = 100*loaded/filesize; 
} 
else 
{ 
	preloader._visible = false;
	//This section doesn't work
	if(picture._height>200)
	{
	 picture._height = 200;
	 picture._xscale = picture._yscale;
	}
	else if(picture._height<200)
	{
	 picture._height = 200;
	 picture._xscale = picture._yscale;
	}
	if(picture._width>300)
	{
	 picture._width = 300;
	 picture._yscale = picture._xscale;
	}
	else
	if(picture._width<300)
	{
	 picture._width = 300;
	 picture._yscale = picture._xscale;
	}
	//End of bad section
	if (picture._alpha<100) 
	 { 
	 picture._alpha += 10;
	 } 
}
}; 

```
