Blue 5mm flashing LED flashes for a while then goes static
If it works well with a 6 volt battery, but not 12 V power supply, then the voltage is too high. Putting a resistor in series drops some voltage, but it depends on the current draw of the LED. Since the LED blinks, then the current likely varies; when it's low (i.e. in the off part of the cycle), most of the voltage is across the LED and not the resistor. To fix that issue, you nee a voltage divider, as shown below.



Without knowing the current draw of the LED, a guess would be to add another 400 or 470 ohm resistor in parallel with the LED, keeping the 400 Ω resistor in series, as well. The voltage across the LED will still swing, but not above it's rated voltage. Theoretically, a electrolytic capacitor of ~100 µfd could go across the LED to smooth the voltage, but that will probably not bee neded.