Correct Answer : while he fell
Scarcely and when comes in a pair and you have to use them in different places in a sentence to make them work. So, in this sentence, replace 'while' with 'when', e.g., Tony had scarcely finished painting when he fell a sleep.