She hummed as she walked into the building.
She was humming as she walked into the building.
These are essentially the same. But the first is the most direct and clear.
She had been humming as she walked into the building.
This distinguishes two time periods in the past, and therefore confuses the action. It implies a prior action (humming) that ended at the start of the second action. It makes sense only if the sentence is, "She had been humming, then walked into the building" or similar.
If the humming continued throughout the entrance, it makes no sense to distinguish two time periods. "Had been" places an action farther in the past. "She had been planning to visit New York, but went to Denver instead to see her cousin."
If there was a need to have a prior time period, the structure might be something like this:
She had been humming as she strolled through the park, and continued humming as she walked into the building.