Recently I came across such sentences in Murphy's grammar:
My camera was stolen when I was in the beach.
and
I used to live near the sea when I was a child.
In these two sentences " when" was the only right conjunction to use. Why can't we use the conjunction "as" here, if it has the meaning "at the same time as"?