Replacing as with when can change the meaning of a sentence.
I jumped rope when I gave a lecture to the class.
What this says is that at some point during the lecture, you jumped rope. The lecture could have lasted forty-five minutes and you might have only jumped rope for thirty seconds at some point during that time. It's also quite possible that you stopped talking when you were jumping rope.
I jumped rope as I gave a lecture to the class.
This provides a sense of concurrency. As indicates several things that when does not.
First, it's much more likely that you spent a lot more time jumping rope. It wasn't just a momentary action but something that was done deliberately as part of the experience. It could commonly be interpreted as meaning that you jumped rope not just for thirty seconds but for most (if not all) of the forty-five minute lecture.
Second, it's much more likely that you actually spoke at the same time that you jumped rope rather than interrupting your lecture in order to engage in the side activity. Because one thing happened as the other thing happened, it means that they both happened at the same time.
If you're going to replace as with something, it should be the word while or the phrase at the same time.
But in your revised sentence, you not only use when (switching it from something that means one thing happens at the same time as something else and for most if not all of the time), but you also drop one of the two things that did happen at the same time.
All of these are as functionally equivalent as you're going to get by just replacing a word:
Looking straight ahead as she walked . . .
Looking straight ahead while she walked . . .
Looking straight ahead at the same time she walked . . .
None of them mean the same thing as:
When she was walking . . .
Although there is more to the sentence after this introductory clause—which enables the use of when to make sense—it's lost the sense of the concurrency of two things: looking straight ahead and walking. (Not least of all because one of those two things is now entirely absent.)
Looking at this particular sentence as a whole, your revision doesn't really change its overall sense. However, if you're going to ask specifically about the use of the word as and what it means, then you need to give more attention to how it is linking together the two items in the introductory clause.