# setInterval pb

**URL:** <https://forum.kirupa.com/t/setinterval-pb/158348>\
**Category:** Uncategorized\
**Created:** [August 9, 2005, 8:47am UTC](https://forum.kirupa.com/t/setinterval-pb/158348 "2005-08-09T08:47:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![5TEF](https://avatars.discourse-cdn.com/v4/letter/5/85e7bf/32.png) [@5TEF](https://forum.kirupa.com/u/5TEF)\
**Post date:** [August 9, 2005, 8:47am UTC](https://forum.kirupa.com/t/setinterval-pb/158348/1 "2005-08-09T08:47:33Z")

</div>

Hi,

i want to make an animation :

one button move bottom to top of the scene ( with help of a proto : _“slide”_).  
the second button, must move bottom to top too, but with a decay of 1 seconde… and the third with a decay of 1.5 seconde.

i think i must use the \*“setInterval” \*command…i try to use it, but it don’t work…here, my AS code ( placed on my button ) :

[font=Verdana][size=2]\*onClipEvent (load) {  
transla = setInterval(slide, 1000, 26);  
if (\_root.button1.\_y=26) {  
clearInterval(transla);  
}  
}

\*how to make it work ?[/size][/font][font=Verdana][size=2][/size][/font]
