# Interval Manager, Dev Kit

**URL:** <https://forum.kirupa.com/t/interval-manager-dev-kit/184837>\
**Category:** open source\
**Created:** [April 8, 2006, 10:18am UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837 "2006-04-08T10:18:14Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![gvozden](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gvozden/32/1084_2.png) [@gvozden](https://forum.kirupa.com/u/gvozden)\
**Post date:** [April 10, 2006, 10:46pm UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/21 "2006-04-10T22:46:20Z")

</div>

I vote for you to write a book  
go 4 it !!!  
respect for sharing stuff with community

---

<div class="post-metadata">

**Author:** ![Lindquist](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@Lindquist](https://forum.kirupa.com/u/Lindquist)\
**Post date:** [April 11, 2006, 1:46am UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/22 "2006-04-11T01:46:44Z")

</div>

From what I’ve heard, there’s nothing better for solidifying your own understanding of Actionscript than writing a book about it. Try e-mailing some other flash authors to get a real breakdown of what it requires. They’re really usually approachable and willing to help.

I’d be glad to read over anything you write (I have a degree in English where I focused on technical writing) to help out with clarity, structure, etc.

P.S.- Don’t forget to be funny.

---

<div class="post-metadata">

**Author:** ![MichaelxxOA](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@MichaelxxOA](https://forum.kirupa.com/u/MichaelxxOA)\
**Post date:** [April 11, 2006, 2:11am UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/23 "2006-04-11T02:11:50Z")

</div>

I have spoken to a few people now, and it looks like this might actually happen. I’d really like to get your guys’ feedback, Take Care.

\_Michael

---

<div class="post-metadata">

**Author:** ![Jeff\_Wheeler](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@Jeff\_Wheeler](https://forum.kirupa.com/u/Jeff_Wheeler)\
**Post date:** [April 11, 2006, 2:12am UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/24 "2006-04-11T02:12:55Z")

</div>

Definitely write a book! That would be so sweet!

And, you’re really, really good. :thumb:

---

<div class="post-metadata">

**Author:** ![MichaelxxOA](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@MichaelxxOA](https://forum.kirupa.com/u/MichaelxxOA)\
**Post date:** [April 11, 2006, 2:20am UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/25 "2006-04-11T02:20:44Z")

</div>

Aw nokrev… you’re going to make me tear up 🙂 Lol, thanks this means alot, seeing as I have alot of support from various forums, I think I’m going to approach this, full force.

\_Michael

---

<div class="post-metadata">

**Author:** ![phorte](https://avatars.discourse-cdn.com/v4/letter/p/77aa72/32.png) [@phorte](https://forum.kirupa.com/u/phorte)\
**Post date:** [April 11, 2006, 5:30am UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/26 "2006-04-11T05:30:15Z")

</div>

Book sounds awsome!

---

<div class="post-metadata">

**Author:** ![RevoGiant](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@RevoGiant](https://forum.kirupa.com/u/RevoGiant)\
**Post date:** [April 11, 2006, 9:46am UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/27 "2006-04-11T09:46:56Z")

</div>

Sorry I am an idiot but I am curious as to when setting an interval comes in handy. Is it when you want certain things in a MC for instance to delay or accelerate or pause for different lengths?

---

<div class="post-metadata">

**Author:** ![MichaelxxOA](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@MichaelxxOA](https://forum.kirupa.com/u/MichaelxxOA)\
**Post date:** [April 11, 2006, 9:53am UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/28 "2006-04-11T09:53:32Z")

</div>

setInterval allows you to call functions at a specific interval.

Let’s say for instance you wanted to say hello overy 1 second ( 1000 milliseconds)

You create a function called sayHello…

```auto

function sayHello()
{
   trace("Hello");
}

```

Then you want to create the interval. setInterval takes in a few parameters

The first is the path to the function. Since we are calling a function that is in the same places as the interval is set, the path is the this keyword. You then put the name of the function as a string. The third parameter is the number of milliseconds inbetween each call. And starting at the fourth parameter, all arguments are passed in order to the function you call.

```auto

var myInt = setInterval(this, "sayHello", 1000, "Michael");

function sayHello( name:String )
{
   trace("Hello " + name);
}

```

You can then clear an interval that is running using the clearInterval method.

```auto

var myInt = setInterval(this, "sayHello", 1000, "Michael");

function sayHello( name:String )
{
   trace("Hello " + name);
   clearInterval( myInt );
}

```

In this example your function is only called once, because it is cleared when the function is called.

I hope this shed some light.

Take Care.

\_Michael

---

<div class="post-metadata">

**Author:** ![bombsledder](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@bombsledder](https://forum.kirupa.com/u/bombsledder)\
**Post date:** [April 11, 2006, 1:15pm UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/29 "2006-04-11T13:15:58Z")

</div>

Ya sounds great write a book, I would write it on advanced actionscript, i’ll read over it too 😛

---

<div class="post-metadata">

**Author:** ![mprzybylski](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mprzybylski/32/613_2.png) [@mprzybylski](https://forum.kirupa.com/u/mprzybylski)\
**Post date:** [April 11, 2006, 2:59pm UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/30 "2006-04-11T14:59:25Z")

</div>

there is a lack of advanced AS books out there, most are geared towards beginners, so it may not be a bad idea actually. you seem to know a lot and like sharing the knowledge…

---

<div class="post-metadata">

**Author:** ![Scarybug](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/scarybug/32/2863_2.png) [@Scarybug](https://forum.kirupa.com/u/Scarybug)\
**Post date:** [April 11, 2006, 3:27pm UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/31 "2006-04-11T15:27:06Z")

</div>

A friend of mine wrote a chapter for “Gaming Hacks” published by O’Reilly. I don’t think it made him rich, but it sure helped his resume.

---

<div class="post-metadata">

**Author:** ![MichaelxxOA](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@MichaelxxOA](https://forum.kirupa.com/u/MichaelxxOA)\
**Post date:** [April 11, 2006, 6:34pm UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/32 "2006-04-11T18:34:16Z")

</div>

Yeah, I definitly don’t plan on getting rich, but I’m sure that writing a book would solidify your resume. I like the idea of Advanced Actionscript. I’m going to try and gather a few ideas, I will post in here as they come to me.

@bombsledder I will definitly take you up on that offer.

Take Care.

\_Michael

---

<div class="post-metadata">

**Author:** ![MichaelxxOA](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@MichaelxxOA](https://forum.kirupa.com/u/MichaelxxOA)\
**Post date:** [April 11, 2006, 6:51pm UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/33 "2006-04-11T18:51:01Z")

</div>

If you guys would like, start posting topics you’d like to read about.

---

<div class="post-metadata">

**Author:** ![RevoGiant](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@RevoGiant](https://forum.kirupa.com/u/RevoGiant)\
**Post date:** [April 11, 2006, 7:06pm UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/34 "2006-04-11T19:06:04Z")

</div>

thanks! Thats cool. Why do you think Flash’s Interval setting is primitive?

---

<div class="post-metadata">

**Author:** ![MichaelxxOA](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@MichaelxxOA](https://forum.kirupa.com/u/MichaelxxOA)\
**Post date:** [April 11, 2006, 7:50pm UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/35 "2006-04-11T19:50:25Z")

</div>

There are a number of reasons that I don’t care for it.

The main thing is management. setInterval returns an integer that represents it’s id. This id is what you pass to clearInterval when you’d like the interval removed. Now due to Flash’s nature of allowing code to be on different timelines, and just little scope oddities, you are not given one central location to manage your intervals.

If you set an interval on one timeline and then try to clear it from another, you have to be sure that your pointing to the interval id correctly. With this manager, or managers similar, you are given one place. All of the interval id’s are stored in an object under the name you provide. This lends itself alot to clarity, as you can identify a box fade interval as “boxFade”.

Another thing that this manager offers is a safer way of managing intervals. With this manager when you set an interval it’s id is automatically stored, and if you try to overwrite an interval that is currently going the old interval is removed first. This keeps you from allowing intervals to run wild, because once you lose the intervalID it’s very difficult to clear that interval.

I hope this made sense, take care.

\_Michael

---

<div class="post-metadata">

**Author:** ![RevoGiant](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@RevoGiant](https://forum.kirupa.com/u/RevoGiant)\
**Post date:** [April 11, 2006, 8:36pm UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/36 "2006-04-11T20:36:44Z")

</div>

wow thanks Michael!

---

<div class="post-metadata">

**Author:** ![MichaelxxOA](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@MichaelxxOA](https://forum.kirupa.com/u/MichaelxxOA)\
**Post date:** [April 11, 2006, 8:47pm UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/37 "2006-04-11T20:47:37Z")

</div>

Another thing that I forgot to mention is that this Manager will free the memory used to store the intervalID, something that does not automatically happen with clearInterval… Take Care.

\_Michael

---

<div class="post-metadata">

**Author:** ![Jeff\_Wheeler](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@Jeff\_Wheeler](https://forum.kirupa.com/u/Jeff_Wheeler)\
**Post date:** [April 11, 2006, 9:53pm UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/38 "2006-04-11T21:53:07Z")

</div>

> [@MichaelxxOA](#):
>
> Yeah, I definitly don’t plan on getting rich, but I’m sure that writing a book would solidify your resume. I like the idea of Advanced Actionscript. I’m going to try and gather a few ideas, I will post in here as they come to me.

On the other hand… if you happen to… I’ll take a few million. 😉

---

<div class="post-metadata">

**Author:** ![MichaelxxOA](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@MichaelxxOA](https://forum.kirupa.com/u/MichaelxxOA)\
**Post date:** [April 11, 2006, 9:57pm UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/39 "2006-04-11T21:57:51Z")

</div>

of course…

---

<div class="post-metadata">

**Author:** ![Jeff\_Wheeler](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@Jeff\_Wheeler](https://forum.kirupa.com/u/Jeff_Wheeler)\
**Post date:** [April 11, 2006, 9:58pm UTC](https://forum.kirupa.com/t/interval-manager-dev-kit/184837/40 "2006-04-11T21:58:49Z")

</div>

Thanks 😉

[Previous page](https://forum.kirupa.com/t/interval-manager-dev-kit/184837.md?page=1)

[Next page](https://forum.kirupa.com/t/interval-manager-dev-kit/184837.md?page=3)
