First off, outside of MAME do they work? For example, on my Windows desktop I can move the gun around and it will control the mouse. If it does work there, then you probably have mouse settings off in the MAME.ini file.
Or you just haven't configured it yet in the game.