Go in to MAME's setup menu (TAB or TILDE or something stock...can't remember). Change the DIAL controller from mouse 1 to mouse 2. Just go in, click on the DIAL controller line and then move the spinner. MAME should change the device name to MOUSE X (whatever mouse # your spinner is assigned to).
That is assuming you have modified the MAME INI file to allow for mouse controls.