Passing parameters to forEach
In earlier versions of HaxeFlixel the FlxGroup class had a callAll function -- you passed it the name of the function to call, and an array of the arguments to pass to the function. This has now apparently been removed and replaced with the forEach function. However, having read the Upgrade Guide and the forEach entry in the API, I can't work out this function is supposed to be used.
(The example in the Upgrade Guide looks suspicious to me -- is it actually correct?)
Can anyone tell me how forEach should be used?
You're right, there was a small syntax error in that code snippet.
You can find a few usage examples in flixel-demos: https://github.com/HaxeFlixel/flixel-demos/search?utf8=✓&q=foreach
Thanks -- those make more sense. I've got it working now.