# \[cs3\] horizontal gallery expending effect

**URL:** <https://forum.kirupa.com/t/cs3-horizontal-gallery-expending-effect/284780>\
**Category:** flash\
**Created:** [March 23, 2009, 4:32pm UTC](https://forum.kirupa.com/t/cs3-horizontal-gallery-expending-effect/284780 "2009-03-23T16:32:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![namelesspace](https://avatars.discourse-cdn.com/v4/letter/n/f4b2a3/32.png) [@namelesspace](https://forum.kirupa.com/u/namelesspace)\
**Post date:** [March 23, 2009, 4:32pm UTC](https://forum.kirupa.com/t/cs3-horizontal-gallery-expending-effect/284780/1 "2009-03-23T16:32:24Z")

</div>

I have an horizontal gallery as the following link:

[http://s3.envato.com/files/11328/index.html](http://s3.envato.com/files/11328/index.html)

i want to change the expending effect so when on Rollover the image will expend from its center and thumbnails on both sides will move to the right and the left. in the original script only the thumbs on right move.

i got some help and i know it has to do with the following code lines:

```auto

function getX(number) {
    ax = thumbrow["thumb"+(number-1)]._x+thumbrow["thumb"+(number-1)]._width+ marginX;
    if(number == 0){
        ax = 0;
    }
    return ax;
}
function getY(number) {
    //ay = centerY+(1-distanceValue)*spanY*Math.sin(rot+number*perinstance);
    ay = -(((thumbrow["thumb"+(number)]._yscale-100)/100)*(spanY/2))
    
    return ay;
}

```

hope someone can help…

Avi
