Using Raycast

Hi,
I'm using the alchemy Box2d port, but not the WCK.
I'm just looking at the raycasting, which works fine, but I'm not able to tweak the callback...
The notes in b2World say:
Code:
/// Ray-cast the world for all fixtures in the path of the ray. Your callback
/// controls whether you get the closest point, any point, or n-points.

but from the suggested callback format
Code:
/// AS3 Callback Signature:
/// function(fixture:b2Fixture, point:V2, normal:V2, fraction:Number):Number;   

it's not clear about how I can change either the callback, or the function where my callback would be received in order to get closest/farthest/all...

Any ideas as to how I can?
You control the ray case by the return value of the function (the fraction). From the Box2D Manual:

Quote:
You control the continuation of the ray cast by returning a fraction. Returning a fraction of zero indicates the ray cast should be terminated. A fraction of one indicates the ray cast should continue as if no hit occurred. If you return the fraction from the argument list, the ray will be clipped to the current intersection point. So you can ray cast any shape, ray cast all shapes, or ray cast the closest shape by returning the appropriate fraction.

You may also return of fraction of -1 to filter the fixture. Then the ray cast will proceed as if the fixture does not exist.
Thanks mayobutter!

Original thread: https://box2d.org/forum/viewtopic.php?t=8037