If the flashing lights are from a posterior vitreous detachment, then once this is complete, the flashing will stop. Otherwise, you will need to seek treatment from an ophthalmologist who can identify what is causing this and recommend how to best resolve it.