In your system preferences, I think under the "options" section in energy saver theres a check box for "automatically reduce screen brightness before sleep". I would think that should stop your screen dimming.
It is there to help save battery life, it shouldn't matter on the power adapter though.