masking bits at runtime

Hi guys,
can anyone please tell me how to change mask bits at runtime? And whether it can be done when a contact was triggered at contact listener? i mean changing physics properties in contact listener? i tried through setmaskbit function but it didnt work.

Thanks in advance
This is from my project, using Box2D AS3 2.1 SVN

Code:
var fd:b2FilterData = body.GetFixtureList().GetFilterData();
fd.maskBits = BIT1 | BIT2;
body.GetFixtureList().SetFilterData(fd);
thanks for the reply

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