# \[FMX\] Easy SetInterval example

**URL:** <https://forum.kirupa.com/t/fmx-easy-setinterval-example/101644>\
**Category:** Uncategorized\
**Created:** [February 12, 2004, 8:02am UTC](https://forum.kirupa.com/t/fmx-easy-setinterval-example/101644 "2004-02-12T08:02:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dboers](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@dboers](https://forum.kirupa.com/u/dboers)\
**Post date:** [February 12, 2004, 8:02am UTC](https://forum.kirupa.com/t/fmx-easy-setinterval-example/101644/1 "2004-02-12T08:02:09Z")

</div>

Hi,

I try to improve my AS skills, and i’m looking for a simple example of the set interval event. Where ever I look I see the most complicated Tuts and examples with stocks etc. Is there somebody who can help me with just a basic simple example. This is what I want to get familiar with the whole thing.

I have one button (btn\_test) and one square(mc\_square) on the stage. mc\_square has the following AS attached:

```auto

onClipEvent (load) 
{
speed = 3;
alpha = 0;
}
onClipEvent (enterFrame) 
{
a = alpha - _alpha;
_alpha += a/speed
}

```

What I want is, that when I click the button, the square is going from alpha 0 to alpha 100, but there has to be a delay of (lets say) 3 seconds before this happens. Please help!!!
