Hi.
Is there any way to add parameters for a function that I’m calling with Timer?
Normally I would this:
ActionScript Code:
[FONT=Courier New][LEFT]createBallsCOLOR=#000000[/COLOR];
[COLOR=#000000]function[/COLOR] createBallsCOLOR=#000000[/COLOR]:[COLOR=#0000FF]void[/COLOR]
[COLOR=#000000]{[/COLOR]
[COLOR=#808080]//some code based on num[/COLOR]
[COLOR=#000000]}[/COLOR]
[/LEFT]
[/FONT]
With Timer:
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#000000]var[/COLOR] myTimer:Timer = [COLOR=#000000]new[/COLOR] Timer[COLOR=#000000]([/COLOR][COLOR=#000080]1000[/COLOR], [COLOR=#000080]1[/COLOR][COLOR=#000000])[/COLOR];
myTimer.[COLOR=#000080]addEventListener[/COLOR][COLOR=#000000]([/COLOR]TimerEvent.[COLOR=#000080]TIMER[/COLOR], createBalls[COLOR=#000000])[/COLOR];
myTimer.[COLOR=#0000FF]start[/COLOR]COLOR=#000000[/COLOR];
[/LEFT]
[/FONT]
Where to put the parameter for that function in the Timer? Is it even possible?