what he said
Also: The main difference between firework powders and explosives like dynamite, is that if you pour a large pile of firecracker powder and light it, it will burn very quick, hot, and very bright, but will take some time to burn completely. The same with gunpowder.
Pour it in a little trail and it will burn down the trail at an observable speed.
Take out the insides of a stick of dynamite and make a pile or a long trail and light it, and it will still explode instantly.
None of the burning like flash powder will do when unconfined.