1.Shehadbeenstudyingforhourswhenherfamilyarrivedhome.
2.Thedoghadbeenbarkingforawhilebeforetheneighborscomplained.
3.Theyhadbeenwaitingforthebusforoveranhourwhenitfinallyarrived.
4.IhadbeenworkingonmyprojectallnightbeforeIfinallyfinishedit.
5.Thechildrenhadbeenplayingintheparkforhoursbeforeitstartedtorain.
6.Bythetimeshegottotheparty,everyonehadbeeneatingforawhile.