# Bug my buttons?

**URL:** <https://forum.kirupa.com/t/bug-my-buttons/261652>\
**Category:** Uncategorized\
**Created:** [May 29, 2008, 2:41pm UTC](https://forum.kirupa.com/t/bug-my-buttons/261652 "2008-05-29T14:41:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thierrydehove](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@thierrydehove](https://forum.kirupa.com/u/thierrydehove)\
**Post date:** [May 29, 2008, 2:41pm UTC](https://forum.kirupa.com/t/bug-my-buttons/261652/1 "2008-05-29T14:41:40Z")

</div>

Good Morning,  
I got this flash template: [http://tanama.net/test/](http://tanama.net/test/)

When you go to Gallery section, and after Commercial or Villa button, you will on the bottom on this page 10 small buttons to active larger photos.

you can see al of them if you start par 10 to 1 but from 1 to 10, It didn’t work, Why ??? I’m lost 😉

Please let me know and thanks in advance for your help  
have a great day, Thierry

**Below my code on my button “1” and after on the “popping up photos” mask**  
on (rollOver) {  
if (\_root.foto\_01.mascara\_01.Ydown != 3) {  
\_root.fotos\_todas.foto\_01.mascara\_01.Ydown = 1;  
}  
}  
on (rollOut) {  
if (\_root.foto\_01.mascara\_01.Ydown != 3) {  
\_root.fotos\_todas.foto\_01.mascara\_01.Ydown = 2;  
}  
}  
on (release) {  
tellTarget (\_root.reverso01) {  
gotoAndStop(1);  
}  
tellTarget (\_root.fotos\_todas.mascara\_link\_fotos) {  
gotoAndStop(2);  
}  
tellTarget (\_root.fotos\_todas.fotona01) {  
gotoAndStop(2);  
play();  
}  
\_root.fotos\_todas.btn\_volta.Ydown = 1;  
}

**and**

onClipEvent (enterFrame) {  
if (Ydown == 1) {  
finalY = 235;  
finalX = 0;  
currentY = \_y;  
currentX = \_x;  
diffY = (finalY + currentY) / 6;  
diffX = (finalX + currentX) / 6;  
\_y = (currentY - diffY);  
\_x = (currentX - diffX);  
} else if (Ydown == 2) {  
finalY = 0;  
finalX = 0;  
currentY = \_y;  
currentX = \_x;  
diffY = (finalY - currentY) / 6;  
diffX = (finalX + currentX) / 6;  
\_y = (currentY + diffY);  
\_x = (currentX - diffX);  
} else if (Ydown == 3) {  
finalY = -252.30000000000001;  
finalX = 0;  
currentY = \_y;  
currentX = \_x;  
diffY = (finalY - currentY) / 15;  
diffX = (finalX + currentX) / 15;  
\_y = (currentY + diffY);  
\_x = (currentX - diffX);  
} else if (Ydown == 4) {  
finalY = 240.90000000000001;  
finalX = -138.90000000000001;  
currentY = \_y;  
currentX = \_x;  
diffY = (finalY - currentY) / 15;  
diffX = (finalX + currentX) / 15;  
\_y = (currentY + diffY);  
\_x = (currentX - diffX);  
} else if (Ydown == 5) {  
finalY = 138;  
finalX = -400;  
currentY = \_y;  
currentX = \_x;  
diffY = (finalY - currentY) / 15;  
diffX = (finalX + currentX) / 15;  
\_y = (currentY + diffY);  
\_x = (currentX - diffX);  
} else if (Ydown == 6) {  
finalY = 138;  
finalX = -400;  
currentY = \_y;  
currentX = \_x;  
diffY = (finalY - currentY) / 15;  
diffX = (finalX + currentX) / 15;  
\_y = (currentY + diffY);  
\_x = (currentX - diffX);  
} else if (Ydown == 7) {  
finalY = 138;  
finalX = -400;  
currentY = \_y;  
currentX = \_x;  
diffY = (finalY - currentY) / 15;  
diffX = (finalX + currentX) / 15;  
\_y = (currentY + diffY);  
\_x = (currentX - diffX);  
} else if (Ydown == 8) {  
finalY = 138;  
finalX = -400;  
currentY = \_y;  
currentX = \_x;  
diffY = (finalY - currentY) / 15;  
diffX = (finalX + currentX) / 15;  
\_y = (currentY + diffY);  
\_x = (currentX - diffX);  
} else if (Ydown == 9) {  
finalY = 138;  
finalX = -400;  
currentY = \_y;  
currentX = \_x;  
diffY = (finalY - currentY) / 15;  
diffX = (finalX + currentX) / 15;  
\_y = (currentY + diffY);  
\_x = (currentX - diffX);  
} else if (Ydown == 10) {  
finalY = 359.10000000000002;  
finalX = -610;  
currentY = \_y;  
currentX = \_x;  
diffY = (finalY - currentY) / 15;  
diffX = (finalX + currentX) / 15;  
\_y = (currentY + diffY);  
\_x = (currentX - diffX);  
}  
}

---

<div class="post-metadata">

**Author:** ![sparkdemon](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@sparkdemon](https://forum.kirupa.com/u/sparkdemon)\
**Post date:** [May 29, 2008, 4:52pm UTC](https://forum.kirupa.com/t/bug-my-buttons/261652/2 "2008-05-29T16:52:31Z")

</div>

code too long…

what seems to be the problem…

---

<div class="post-metadata">

**Author:** ![thierrydehove](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@thierrydehove](https://forum.kirupa.com/u/thierrydehove)\
**Post date:** [May 29, 2008, 7:15pm UTC](https://forum.kirupa.com/t/bug-my-buttons/261652/3 "2008-05-29T19:15:52Z")

</div>

Hi  
thanks for your reply  
I’m not sure if I was clear -) but I have copied 2 codes on my question…  
**first: my main button’s code**  
on (rollOver) {  
if (\_root.foto\_01.mascara\_01.Ydown != 3) {  
\_root.fotos\_todas.foto\_01.mascara\_01.Ydown = 1;  
}  
}  
on (rollOut) {  
if (\_root.foto\_01.mascara\_01.Ydown != 3) {  
\_root.fotos\_todas.foto\_01.mascara\_01.Ydown = 2;  
}  
}  
on (release) {  
tellTarget (\_root.reverso01) {  
gotoAndStop(1);  
}  
tellTarget (\_root.fotos\_todas.mascara\_link\_fotos) {  
gotoAndStop(2);  
}  
tellTarget (\_root.fotos\_todas.fotona01) {  
gotoAndStop(2);  
play();  
}  
\_root.fotos\_todas.btn\_volta.Ydown = 1;  
}

**and after the code “attached” to the animation effect**

then what do you mean the code is too long ?

Thanks, thierry
