You can use the following equation of projectile trajectory to make your explosions.
x = v*cos(a)*t
y = v*sin(a)*t - ½gt²
Keep an array of 100 or so particles that will make up the firework. Given a random velocity (v) for each particle and a random angle (a). Then just step through the time, updating their positions.