# Explain this code to me plz

**URL:** https://forum.kirupa.com/t/explain-this-code-to-me-plz/54572
**Category:** flash
**Created:** [June 15, 2004, 8:58pm UTC](https://forum.kirupa.com/t/explain-this-code-to-me-plz/54572 "2004-06-15T20:58:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Cloakendagger](https://avatars.discourse-cdn.com/v4/letter/c/2bfe46/32.png) [@Cloakendagger](https://forum.kirupa.com/u/Cloakendagger)
#### Post date: [June 15, 2004, 8:58pm UTC](https://forum.kirupa.com/t/explain-this-code-to-me-plz/54572/1 "2004-06-15T20:58:37Z")

</div>

Yo,  
I posted a few threads back and I think I might have what Im looking for.  
Im not totaly sure how I got it to work but it works.  
Could some one explain to me how this code works.  
on (rollOver) {  
gotoAndPlay(2);  
}  
Its placed on the tab that activates the menue. On my stage I have 3 frames

1. the activate tab
2. for the menue going down
3. for the menue going up  
I thought that the code would only tell the tab to go to frame 2 and stop. But as you can see it also plays frame 3 when you rollover it again.

Does it work like this  
If the time line is on frame 1 then go to frame 2.  
But if time line is on frame 2 then frame 2 is 1 and thus go to frame 3 represented as frame 2.  
thanks cloak.  
[http://www.deck-medics.com/DM-2.swf](http://www.deck-medics.com/DM-2.swf)
