OK i so far understand that when the switch is closed current flows to the capacitor. The capacitor than receives a charge, and when it has enough of a charge the transistor is turned on, which causes the LED to turn on. LED draws current from the capacitor causing the amount of current in the capacitor to decrease. Not enough energy to light up the LED, LED turns off, cycle repeats.
Question: What is the role of the resistor, the transformer, and the transistor in this circuit (how do they work together as part of a timing circuit?)