As far as I can see your btn1 and flv1 objects only exist in the first frame.
They should also exist in the second frame (the frame you attached the script to).