# Gallery

**URL:** <https://forum.kirupa.com/t/gallery/63652>\
**Category:** Uncategorized\
**Created:** [September 8, 2004, 9:05pm UTC](https://forum.kirupa.com/t/gallery/63652 "2004-09-08T21:05:49Z")\
**Posts on this page:** 19\
**Page:** 2

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 13, 2004, 5:06pm UTC](https://forum.kirupa.com/t/gallery/63652/21 "2004-09-13T17:06:00Z")

</div>

> [@hamidb4](#):
>
> nice work stringy, scotty.  
> some improvements to this gallery would be nice if you guys find some time:  
> once you view an image, you can not see it again. I guess because thumb nails are not buttons.  
> 2- easing on the image as it comes to the view.  
> 3-shuffling the thumbs could use some easing too.  
> finally, for people like me commenting the code would be great.  
> thank you so much for your efforts.

1/remove the line this.enabled = false;  
2/I`m pretty sure there are fadein type tutorials on here and it should be fairly easy to combine; at least have a go and see if you run into problems.  
3/Not really sure what you mean, if you mean the speed at which they move, just alter the value of myClip.speed = 1+random(20);

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 13, 2004, 6:30pm UTC](https://forum.kirupa.com/t/gallery/63652/22 "2004-09-13T18:30:08Z")

</div>

stringy,  
will the altering value of myClip.speed = 1+random(20); give me the smooth shuffling like in the site eccentris?  
I don’t seem to get the magic number.  
thank you

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 13, 2004, 7:58pm UTC](https://forum.kirupa.com/t/gallery/63652/23 "2004-09-13T19:58:14Z")

</div>

> [@hamidb4](#):
>
> stringy,  
> will the altering value of myClip.speed = 1+random(20); give me the smooth shuffling like in the site eccentris?  
> I don’t seem to get the magic number.  
> thank you

sorry hamidb4, [eccentris.com](http://eccentris.com) is taking too long to load for me to look. The original site you posted are using 2 functions(or at least 1 function used on 2 different arrays), one similar to mine which is the second to be called.You could probably do away with the random speed/random count altogether.  
If you changed the code to this, you`ll see something like the first function which they use  
function shuffle() {  
return Math.round(Math.random());  
}  
createEmptyMovieClip(“paper”, 1);  
createEmptyMovieClip(“paper2”, 2);  
myArray.sort(shuffle);  
function move() {  
paper2.loadMovie(“pic”+this.k+“.jpg”);  
this.swapDepths(-200-this.k);  
this.gotoAndStop(5);  
this.enabled = false;  
for (var k = 5; k\<15; k++) {  
goOn.apply(clipa[k]);  
}  
}  
function goOn() {  
this.num = Math.round(Math.random()_4)-2;  
this.onEnterFrame = function() {  
this.counter–;  
if (this.counter\<=0) {  
this.counter = 0;  
this.\_x += ((myArray[this.k+this.num][0])-this.\_x)/this.speed;  
if (Math.abs(myArray[this.k][0]-this.\_x)\<1 && Math.abs(myArray[this.k][1]-this.\_y)\<1) {  
this.\_x = myArray[this.k][0];  
this.\_y = myArray[this.k][1];  
delete this.onEnterFrame;  
this.counter = random(5);  
}  
}  
};  
}  
clipa = [];  
function init() {  
for (var i = 0; i\<20; i++) {  
myClip = paper.attachMovie(“mc”, “mc”+i, i_2);  
myclip.myText.text = i;  
myClip.k = i;  
myClip.\_y = myArray[myClip.k][1];  
myClip.\_x = myArray[myClip.k][0];  
myClip.speed = 10;  
myClip.counter = random(5);  
myClip.onPress = move;  
clipa.push(myClip);  
}  
}  
init();

at the end of this “goOn” function you would have to call the other function.  
I made the original file in just a few mins, it was never ment to be a finished thing; was just to give you an idea of how it was made. If I have time later on in the week i`ll try and replicate the movement.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 13, 2004, 10:57pm UTC](https://forum.kirupa.com/t/gallery/63652/24 "2004-09-13T22:57:47Z")

</div>

stringy,  
Original post had the same smooth look to it too. It would be great to see your file improved if you have time. Also some comment is helpful even if it is to mention what each section of the code does. A newbie here you know. LOL  
Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 14, 2004, 1:14am UTC](https://forum.kirupa.com/t/gallery/63652/25 "2004-09-14T01:14:32Z")

</div>

tq stringy and scotty ur guy’s are really great help…and nice work too… :thumb:

//edit:

eventhough there is misunderstanding here…actually i just wanna place the button to right side only not to keep moving button everytime i click…because i 'm using 800x600 movie stage…anyway it’s nice work…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 14, 2004, 1:41pm UTC](https://forum.kirupa.com/t/gallery/63652/26 "2004-09-14T13:41:22Z")

</div>

pixeldude,  
if you replace the first portion of stringy’s code with scotty’s code, all you have to do then is to adjust: var start X=50, and: var start Y=50 to where you wish on the stage.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 14, 2004, 2:58pm UTC](https://forum.kirupa.com/t/gallery/63652/27 "2004-09-14T14:58:31Z")

</div>

[http://www.gifsrus.com/testfile/gridbuttons2.swf](http://www.gifsrus.com/testfile/gridbuttons2.swf)  
getting any nearer?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 14, 2004, 3:49pm UTC](https://forum.kirupa.com/t/gallery/63652/28 "2004-09-14T15:49:21Z")

</div>

I checked the swf in post#25, and yes it is getting much better.  
I know it is just a test but for those who are following this thread as you click on each thumb nail they overlap each other because you start with 20 thumbs. I don’t know what the relationship between the number of thumbs for 5 rows and 4 column would be.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 14, 2004, 9:28pm UTC](https://forum.kirupa.com/t/gallery/63652/29 "2004-09-14T21:28:21Z")

</div>

I have commented the code to a point but if there is anything you specifically don`t understand just ask. I`ve mad a simple masking transition and simple preloader(easy to swap with loading bar/animation etc).  
The file i have uploaded will stop working if you try press any buttons above 4 as i have only made swf`s 0 -\>4.  
[http://www.gifsrus.com/testfile/fadeinout/gridbuttons2.swf](http://www.gifsrus.com/testfile/fadeinout/gridbuttons2.swf)  
in each swf first frame is blank with a stop() action, second frame contains the picture.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 15, 2004, 12:59am UTC](https://forum.kirupa.com/t/gallery/63652/30 "2004-09-15T00:59:01Z")

</div>

> [@hamidb4](#):
>
> pixeldude,  
> if you replace the first portion of stringy’s code with scotty’s code, all you have to do then is to adjust: var start X=50, and: var start Y=50 to where you wish on the stage.

tq hamidb4 for the hint but i just got figure out myself…without replacing the code …anyway tq…

edit:// btw…really nice work stringy…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 15, 2004, 5:59am UTC](https://forum.kirupa.com/t/gallery/63652/31 "2004-09-15T05:59:30Z")

</div>

stringy,  
any specific reason you used swf’s instead of regular jpg files?  
can you use any swf file?  
the overlapping issue still exists.  
as far as the code, with the changes you have made, i’m too \*\*\*\* confuse now. as soon as i can stop my head from spinning out of control, I’m gonna ask some questions.LOL  
Thank you so much for your efforts.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 15, 2004, 10:40am UTC](https://forum.kirupa.com/t/gallery/63652/32 "2004-09-15T10:40:10Z")

</div>

This site reminds me of a site I saw a while ago, [http://www.eccentris.com](http://www.eccentris.com) 😃

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 15, 2004, 7:24pm UTC](https://forum.kirupa.com/t/gallery/63652/33 "2004-09-15T19:24:52Z")

</div>

> [@hamidb4](#):
>
> stringy,  
> any specific reason you used swf’s instead of regular jpg files?  
> can you use any swf file?  
> the overlapping issue still exists.  
> as far as the code, with the changes you have made, i’m too \*\*\*\* confuse now. as soon as i can stop my head from spinning out of control, I’m gonna ask some questions.LOL  
> Thank you so much for your efforts.

I just thought swf would be more flexible, regular jpg will work too.I think any swf should work( as long as you have not used references to \_root etc.)  
The best i could offer for the overlapping is just to swapDepths() without drasticly altering the file.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 16, 2004, 8:28am UTC](https://forum.kirupa.com/t/gallery/63652/34 "2004-09-16T08:28:05Z")

</div>

> [@stringy](#):
>
> [http://www.gifsrus.com/testfile/fadeinout/gridbuttons2.swf](http://www.gifsrus.com/testfile/fadeinout/gridbuttons2.swf)  
> in each swf first frame is blank with a stop() action, second frame contains the picture.

nice work stringy…but i just curious which part in ur code if i wanna add row and column to the button…i try to figure out but it’s seem stuck up…so can u point to me where to put in ur code…

thx…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 16, 2004, 6:08pm UTC](https://forum.kirupa.com/t/gallery/63652/35 "2004-09-16T18:08:28Z")

</div>

> [@pixeldude](#):
>
> nice work stringy…but i just curious which part in ur code if i wanna add row and column to the button…i try to figure out but it’s seem stuck up…so can u point to me where to put in ur code…
> 
> thx…

delete the arraypush() things and the attachmovie code and replace with  
myArray = ;  
aArray = ;  
bArray = ;  
for (var y = 0; y\<4; y++) {  
for (var x = 0; x\<6; x++) {  
i++;  
myclip = attachMovie(“mc”, “mc”+i, i);  
myclip.\_x = 200+x\*(myclip.\_width+10);  
myclip.\_y = 200+y\*(myclip.\_height+10);  
myArray.push([myclip.\_x, myclip.\_y]);  
myclip.ivar = i;  
myclip.ivar%2 != 1 ? aArray.push(myclip) : bArray.push(myclip);  
myClip.onPress = sideMoveset;  
}  
}

just change the y\<4,x\<6 to what you want.  
position is determined by the 200`s space between by 10`s.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 17, 2004, 6:20am UTC](https://forum.kirupa.com/t/gallery/63652/36 "2004-09-17T06:20:52Z")

</div>

tq stringy …nice work…one more question stringy then i will shut my mouth :gm: …if i wanna load pic just replace…  
[AS]loadMovie(“movie”+this.ivar+".swf", loader);[/AS]  
with this…  
[AS]loadMovie(“pic”+this.ivar+".jpg", loader);[/AS]  
am i rite …but when i click to load the pic it seem’s not show all…it’s only show half of it…is that my replacement code totally wrong?..

p/s:if u don’t mind just put the numbering to the each button…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 17, 2004, 4:54pm UTC](https://forum.kirupa.com/t/gallery/63652/37 "2004-09-17T16:54:41Z")

</div>

> [@pixeldude](#):
>
> tq stringy …nice work…one more question stringy then i will shut my mouth :gm: …if i wanna load pic just replace…  
> [AS]loadMovie(“movie”+this.ivar+“.swf”, loader);[/AS]  
> with this…  
> [AS]loadMovie(“pic”+this.ivar+“.jpg”, loader);[/AS]  
> am i rite …but when i click to load the pic it seem’s not show all…it’s only show half of it…is that my replacement code totally wrong?..
> 
> p/s:if u don’t mind just put the numbering to the each button…

I`m not sure what is wrong,i`ve just tried the same with a number of different sized pictures and it seems ok  
[http://www.gifsrus.com/testfile/fadeinout/gridbuttons2.swf](http://www.gifsrus.com/testfile/fadeinout/gridbuttons2.swf)  
(only put 0-\>6 pictures on)  
check that your pictures are not progressive.

Not sure what you mean by the numbering. This is the line which controls the numbers myclip.myText.text = i;  
if you don`t want numbers, delete it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 19, 2004, 3:18am UTC](https://forum.kirupa.com/t/gallery/63652/38 "2004-09-19T03:18:28Z")

</div>

> [@stringy](#):
>
> I`m not sure what is wrong,i`ve just tried the same with a number of different sized pictures and it seems ok  
> [http://www.gifsrus.com/testfile/fadeinout/gridbuttons2.swf](http://www.gifsrus.com/testfile/fadeinout/gridbuttons2.swf)  
> (only put 0-\>6 pictures on)  
> check that your pictures are not progressive.
> 
> Not sure what you mean by the numbering. This is the line which controls the numbers myclip.myText.text = i;  
> if you don`t want numbers, delete it.

tq…stringy…great works…and great help…tq

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 19, 2004, 6:43pm UTC](https://forum.kirupa.com/t/gallery/63652/39 "2004-09-19T18:43:21Z")

</div>

> [@pixeldude](#):
>
> tq…stringy…great works…and great help…tq

You are welcome

[Previous page](https://forum.kirupa.com/t/gallery/63652.md?page=1)
