Would someone PLEASEEE explain! (Moved)

This thread was initially posted at Flash MX and now have been moved appropriately

I am wondering if someone knows where i can find the documentation of the scroll method? I am trying to understand person13.com tutorial on creating
components and the code is not documented properly at all.

http://www.person13.com/articles/co...components.html

This is where i am lost.

setInterval(this._parent,“scroll”,10);

if i understand clearly, the first parameter is the object, the second the function name and the third parameter is the parameter for the function.

but the function defined doesnt take any parameter like that. The articles another format of function calling
setInterval(this._parent,“nudge”,10, 1);

and the defined nudge function takes only one parameter and which is 1.
I dont understand where is the 10 going???


Harpreet


Reply from MINDFICTION


Hi,

you might want to check the AS documentation. It’s all explained.

Quote:
setInterval( object, methodName, interval[, arg1, arg2, …, argn] )

Parameters

function A function name or a reference to an anonymous function.

object An object derived from the Object object.

methodName The name of the method to call on the object parameter.

interval The time in milliseconds between calls to the function or methodName parameter.

þarg1, arg2, …, argn Optional parameters passed to the function or methodName parameter.

In regard to that component where there doing this…
ActionScript:

_mcScrollThumb.onPress = function():Void {
this._parent._nOffset = this._ymouse;
this._parent._nInterval = setInterval(this._parent, “scroll”, 10);
};

it’s calling function scroll which resides in the parent object of this object, and passing this function the value 10.

Does that explain what you were after?


mind[*]friction
“Think outside your box”
-R.W.L


Thats what i thought but I am having a rough time finding the documentation of it within the documentation on the Macromedia website. Anyone please fwd me the link to the specific page. Thanks