# Explain this code to me plz

**URL:** <https://forum.kirupa.com/t/explain-this-code-to-me-plz/113196>\
**Category:** Uncategorized\
**Created:** [June 15, 2004, 8:58pm UTC](https://forum.kirupa.com/t/explain-this-code-to-me-plz/113196 "2004-06-15T20:58:37Z")\
**Posts on this page:** 5\
**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/113196/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)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2004, 6:02am UTC](https://forum.kirupa.com/t/explain-this-code-to-me-plz/113196/2 "2004-06-16T06:02:17Z")

</div>

_bump_

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2004, 6:09am UTC](https://forum.kirupa.com/t/explain-this-code-to-me-plz/113196/3 "2004-06-16T06:09:20Z")

</div>

do you have a fla?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2004, 6:29am UTC](https://forum.kirupa.com/t/explain-this-code-to-me-plz/113196/4 "2004-06-16T06:29:22Z")

</div>

No, Im sorry the file is just shy of the limit; even zipped.  
All i want it to do is go to frame 2 with the mouse is over the hit area and frame 3 when the mouse rolls out.  
Right now you have to click on the same spot to open and close the menue. I just want it to be smooth. ya know what i mean.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 16, 2004, 7:28am UTC](https://forum.kirupa.com/t/explain-this-code-to-me-plz/113196/5 "2004-06-16T07:28:04Z")

</div>

on (rollOver) {  
gotoAndStop(“2”);  
}

stop being the operative word. this will take the playhead to your mouse down frame. if you want to go to your mouse up frame, you can use this:

on (rollOut) {  
gotoAndStop(“3”);  
}
