im a c++programmer and im trying to learn AS. Could you be so kind and explain how come we have two functions with the same name and why do we need onenterframe and clearinterval???
You don’t need them both, either use the [font=courier new]onEnterFrame[/font] handler (you should use a movie clip, not a button) or the [font=courier new]setInterval[/font] (you can use a movie clip or a button) function. These are used to call the function constantly.
And we have two functions with the same name because I posted an example on how to do it by using an [font=courier new]onEnterFrame[/font], and another one using [font=courier new]setInterval[/font] (separated by the comment line!).