What you are seeing when you see puffs of flame and smoke when the building collapses are thousands and thousands of cubic feet of superheated air being forced out by the pancaking downward motion of the collapse. Pre-collapse flashes are caused by superheated air being forcing its way out of the building. The fire feeds on the new oxygen source and causes an explosion of flame to shoot out. Its simple physics.