# How to display images in center in xml slide show

**URL:** <https://forum.kirupa.com/t/how-to-display-images-in-center-in-xml-slide-show/307433>\
**Category:** Uncategorized\
**Created:** [April 3, 2010, 6:48am UTC](https://forum.kirupa.com/t/how-to-display-images-in-center-in-xml-slide-show/307433 "2010-04-03T06:48:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![access\_ideas](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@access\_ideas](https://forum.kirupa.com/u/access_ideas)\
**Post date:** [April 3, 2010, 6:48am UTC](https://forum.kirupa.com/t/how-to-display-images-in-center-in-xml-slide-show/307433/1 "2010-04-03T06:48:34Z")

</div>

**How to display images in center in xml slide show**

I have created a flash animation using tutorial on [kirupa.com](http://kirupa.com)  
[http://www.kirupa.com/developer/mx20…otogallery.htm](http://www.kirupa.com/forum/../developer/mx2004/xml_flash_photogallery.htm)  
The problem I am facing is my images are of different size, so how to display images in center.

I have used this code, it displays images in center in IE but in firefox it displays  
half image

```
if (picture._alpha&lt;100) { 
        picture._alpha += 10; 
        picture._x = (Stage.width/2) - (picture._width/2);
        picture._y = 40;
    }

```

Kindly provide solution for this
