Firs thing, make sure all power cords are in all the way, some laptop power bricks are two piece and the plugs may have worked loose and not making full connection.
Sounds like the power adapter may be bad and it's flickering momentarily just on residual battery power. If the plug from the wall to the power brick lights up the power brick light (usually blue or green) then the brick is good. If it lights up than the cord from the brick to the laptop may also be frayed or short. You can test the continuity of that piece with a voltage meter. If both check out the power plug may be broken inside the laptop. That maybe repairable if it is easily accessible but should be done by a professional since it is soldered to the mobo.