It is all about the angle, for the scout one they have two demos, the one that shoots the spikey and then one behind the scout that shoots it, they added in the sound effect using a video editor, the other one is almost same process, two pyros one to do taunt the other one actually shoots his flamethrower from other side of camera. I am pretty sure this is how it works, if it did work for real, that would be pretty freaking sweet.