You really should check in Acer's forums, because it could be a bunch of things, from a lose power connector on the mainboard inside the computer, to a defective battary or other issues like a faulty cap or overheating.
As a guess, it sounds like your battery is dying, and that the laptop needs the battery in order to function (some can work with it removed some can't, using the battery like a UPS).
From the sound of things the reason it works after a while is that it's very slowly holding a small charge, and then it uses it up and when you try to use it plugged in it doesn't have enough to keep working on.
What battery did it have in it? I have a friend with an Aspire C3010 and her battery with a 100% charge only lasts about 45 minutes or so. Just wondering as I remember Sony had a problem with a lot of batteries in laptops. Thanks for a reply.