# Rollover button with AS2

**URL:** <https://forum.kirupa.com/t/rollover-button-with-as2/240478>\
**Category:** flash\
**Created:** [October 3, 2007, 12:12pm UTC](https://forum.kirupa.com/t/rollover-button-with-as2/240478 "2007-10-03T12:12:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![henry05](https://avatars.discourse-cdn.com/v4/letter/h/97f17d/32.png) [@henry05](https://forum.kirupa.com/u/henry05)\
**Post date:** [October 3, 2007, 12:12pm UTC](https://forum.kirupa.com/t/rollover-button-with-as2/240478/1 "2007-10-03T12:12:40Z")

</div>

Hi, could anybody help me out on this?

I am trying to build a website for my sister’s wedding with photo album. Here’s the link of the flash file for your reference.  
[http://www.da-ric.com/main/main1.swf](http://www.da-ric.com/main/main1.swf)  
Problem is when I click on the “main menu” button, it should go back to main page. It does show the main page but also shows mouse over effect of the button. I can only restore it by mouse over the button again. What I want is just load the main page without any photos after clicking “main menu” button, just as it showed before any button is clicked.

here’s the AS2 code for the button:

Action  
\_root.wedbtn.onEnterFrame = function() {  
if (mouse\_over\_wedbtn) {  
\_root.wedbtn.nextFrame();  
} else {  
\_root.wedbtn.prevFrame();  
}  
};

Button  
on (rollOver) {  
\_root.mouse\_over\_wedbtn = true;  
}  
on (rollOut) {  
\_root.mouse\_over\_wedbtn = fstartlse;  
}  
on (release) {  
gotoAndStop(“Scene 2”, 80);  
}

Any inputs are welcome, thanks in advance!

Cheers,  
Henry
