Hi TraceyRee,
Welcome to the Q&Board!
Unfortunately, there is no relationship between the number of megapixels your camera has and the effectiveness of an in-camera flash on a digital camera. Why the flash gives better results than another remains a mystery to me.
Most built-in flashes on a digital camera do a so-so job. You must be careful to stay within the flash range recommende by the manufacturer (check the manual). You didn't mention the model of your camera, but check if it has flash compenstation so you can adjust the output of the light.
I think you will find this additional information helpful about using an built-in flash:
http://www.digicamhelp.com/digital-camera-features/digital-camera-flash.htmLet us know if any of the suggestions help.
Incidently, many people who do a lot of inside photography end up getting an external flash.