# Arghgh I give up

**URL:** <https://forum.kirupa.com/t/arghgh-i-give-up/141983>\
**Category:** Uncategorized\
**Created:** [March 24, 2005, 6:18pm UTC](https://forum.kirupa.com/t/arghgh-i-give-up/141983 "2005-03-24T18:18:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cobol](https://avatars.discourse-cdn.com/v4/letter/c/df705f/32.png) [@Cobol](https://forum.kirupa.com/u/Cobol)\
**Post date:** [March 24, 2005, 6:18pm UTC](https://forum.kirupa.com/t/arghgh-i-give-up/141983/1 "2005-03-24T18:18:14Z")

</div>

Have been working on a image gallery but I ended up screwing myself over. Now I need to make it infinite and I tried a few variations but no luck.

Anyone have an idea, either I fix or I redo the darn thing.

> MovieClip.prototype.easeX = function (x)  
> {  
> this.onEnterFrame = function ()  
> {  
> this.\_x = x - (x - this.\_x) / 1.200000;  
> if (Math.abs(x - this.\_x) \<= 0.500000)  
> {  
> delete this[“onEnterFrame”];  
> this.\_x = x;  
> } // end if  
> };  
> };  
> images = new Array();  
> xml\_file = “images.xml”;  
> xmlload = new XML();  
> xmlload.ignoreWhite = true;  
> xmlload.onLoad = function (ok)  
> {  
> if (ok)  
> {  
> count = this.firstChild.childNodes.length;  
> var \_l2 = 0;  
> while (\_l2 \< count)  
> {  
> curNode = this.firstChild.childNodes[\_l2];  
> images[\_l2] = {caption: curNode.childNodes[0].firstChild.nodeValue, path: curNode.childNodes[1].firstChild.nodeValue};  
> \_l2++;  
> } // end while  
> boot();  
> }  
> else  
> {  
> trace("Could not load " + xml\_file + “.”);  
> } // end if  
> };  
> xmlload.load(xml\_file);  
> spacing = 20;  
> boot = function ()  
> {  
> var \_l2 = 0;  
> while (\_l2 \< images.length)  
> {  
> mc = container.attachMovie(“thumbMC”, “thumb” + \_l2, \_l2);  
> mc.\_x = \_l2 \* (50+ spacing);  
> mc.path = “thumbs/” + images[\_l2].path + “.jpg”;  
> mc.link = “images/” + images[\_l2].path + “.jpg”;  
> mc.caption = images[\_l2].caption;  
> \_l2++;  
> } // end while  
> this.\_parent.picture.\_alpha = 0;  
> this.\_parent.caption.\_alpha = 0;  
> this.\_parent.picture.loadMovie(“images/” + images[0].path + “.jpg”);  
> this.\_parent.caption.txt = images[0].caption;  
> setRollOver();  
> };  
> setRollOver = function ()  
> {  
> this.onEnterFrame = function ()  
> {  
> if (this.mask.hitTest(\_root.\_xmouse, \_root.\_ymouse))  
> {  
> slideMenu();  
> } // end if  
> };  
> };  
> slideMenu = function ()  
> {  
> diff = \_parent.\_xmouse - this.\_x;  
> scale = diff \* 1000 / this.mask.\_width;  
> target = -scale \* (this.container.\_width - this.mask.\_width) / 930;  
> this.container.easeX(target);  
> this.slideStroke.easeX(diff);  
> };
