If the ground is just flat then the above still holds true. Just change velocity to velocityY and add a velocityX.
When you launch from the cannon you have a speed and angle in mind so you set the velocities with trig:
Set velocityX to speed*cos(ang)
Set velocityY to speed*sin(ang)
And add an event to move horizontally:
---ball: set X to x+velocityX
This can get as elaborate as you add more features. I won't be able to explain it all. The physics behavior is there for a reason. It's probably better to use that for what you know.