this might work without script, but I haven't tested it.
make a 2 point path, 1 point then the next point about 4 horizontal screens away with no change in the vertical direction.
Create the fireball sprite with an animation and some speed, a 1 or 2 jump height(up requires solid), and some gravity value that is set to this path, no initial instance. Set it to follow approximate path. Deleted when off screen.
Now your special function that creates the fireball (I'm assuming the player shoots it, ala mario. Set it to appear "relative to player"
If your player is much taller than the fireball, the fireball should be constantly jumping trying to get to the y point of the path while moving forward.
If it doesn't work, you might have to make the path many points instead of just 2. Also, you need to do a bunch of fancy other stuff to make it so you can only have a limited number of fireballs, shoot either left or right. Also you might have to tweak its speed, jump height, and gravity to get it to act how you want.