There is no great difference between 'as' and 'while in the first. It's a matter of personal choice. Only 'while' works in the second, as it's followed by a present participle.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.