Arreglándose para la fiesta, alguien llamó a la puerta.
While getting ready for the party, someone knocked on the door.
In English I believe this is incorrect. The gerund refers to the subject in the other sentence, so this sounds as if whoever knocked on the door was also getting ready for the party.
In Spanish if it is correct - how do we know it refers to ella? Based on context?