In this work, we employed a micro-electro-mechanical system (MEMS) mirror as the scanner to reduce the size of the opto-acuostic-fludic system. To evaluate the performance of this system, we imaged flowing droplets generated by Tjunction and flow focusing configurations. The results demonstrate the feasibility of this method in the study of droplet formation dynamics. We also imaged flowing magnetic microspheres to verify the influence of magnetic field. In the end, cancer cells were successfully detected in the microchannel to demonstrate the potential of this method in clinical applications.