Let's say you have two Sprite objects called A and B. On the event sheet you make an event for A object: On collision with B. Then you add the Set frame action for A and/or B objects to that event. Since a collision picks the two instances taking part in the collision, you can set their frame just by checking the collision and using the set frame action.