They are very similar.
The only difference would be the continuity of the action. 'when' would be used for something that happened immediately after. 'I jumped when...' or 'when... I left for home'. as would be more for something that was happening previously. It would be similar to a continuous tense. 'he was still talking as the clock...'