how can a solenoid be used to fire4 small ball?

Use your imagination, and experiment.