Palette Swapping in AS3?

Well we’ve all probably seen the “Mortal Kombat” ninja before. But how possible is it to do this with AS3 using a bitmap in a mc.

I have searched all over the place for a tutorial on how to go about this but I can’t seem to find anything that suites my needs.

Does anyone have any pointers?
Do you think Flash has the power to do this at runtime for a game?