If you are using mame32, go to Options->Default Game Options->Controllers and make sure the "Enable Mouse Input" checkbox is turned on. If that doesn't do the trick, then more info is required...What version of mame are you using?
Ohh, BTW...welcome to the forum!