When, while, as - used to express time

when is used, with simple tenses:

1 When one action occurs at the same time as another or in the span of another:

  • When it is wet the buses are crowded.
  • When we lived in town we often went to the theatre.

2  When one action follows another:

  • When he explained the situation she calmed down.

as is used:

3  When the second action occurs before the first is finished:

  • As I walked through the park I remembered about my mother's birthday.

The above sentence implies that I remembered about my mother's birthday before  had completed the action of walking thorugh the park; I was probably still in the park.

While I was walking would have the same meaning here, but When I walked would give the impression that the act of walking through the park was complete and he was no longer in the park.

For parallel actions:

  • The men whistled as she walked past.

5 For parallel development:

  • As he listened to the story he grew more and more curious.
  • The darker it grew, the colder it became.
  • As he worked harder he was getting more and more money for his work.

If we used when here we would lose all idea of simultaneous progression or development.

6  To mean while:

  • As he was watching  TV his wife was preparing a meal.

However, there is no particular advantage in using as here, and while is safer.