# Actionscript—photo gallery tweaking

**URL:** <https://forum.kirupa.com/t/actionscript-photo-gallery-tweaking/167045>\
**Category:** Uncategorized\
**Created:** [October 25, 2005, 12:33am UTC](https://forum.kirupa.com/t/actionscript-photo-gallery-tweaking/167045 "2005-10-25T00:33:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roxy031](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@roxy031](https://forum.kirupa.com/u/roxy031)\
**Post date:** [October 25, 2005, 12:33am UTC](https://forum.kirupa.com/t/actionscript-photo-gallery-tweaking/167045/1 "2005-10-25T00:33:40Z")

</div>

hi everyone! i designed a photo gallery for a photographer’s website, using the tutorial found here: [http://www.kirupa.com/developer/mx/photogallery.htm](http://www.kirupa.com/developer/mx/photogallery.htm). (you can view the actual site at [www.jennifersanderson.com/gallery.html](http://www.jennifersanderson.com/gallery.html)) everything works perfectly and the client loves it, but the only problem is this—if the vertical pictures are centered, then the horizontal ones are off-center, and vice versa. i’m sure there’s some actionscript that can fix this, maybe a conditional statement or something? something along the lines of

if (photo\_mc.\_width \> 300){  
photo\_mc.\_x = -200;  
}  
else{  
photo\_mc.\_x = 0;

although this code didn’t actually work, i think it would be something like this. can anyone help me? thank you so much in advance, i really appreciate it.

morgan
