Transparent render

Hi all
How can I achieve a transparent background for a small 250 frame animation of a golden key dropping and swinging back and forth with a glaring light behind it.
I used a 1 pixel star for the glow but don’t know how to get it to switch off and on at certain frames.
My daughter wants to use my animation on her opening screen of a game she is working on.
many thanks
Roger