Movie Clip Button woes...:/

Well I have been working on this little do-dad for about 2 days now and I can’t seem to get it right…

button.onRollOver = function() {
_root.button.gotoAndPlay(2);

_root.button.onPress = function () {
getURL("http://www.caribase.com", "_parent");

button.onRollOut = function() {
	_root.button.gotoAndPlay(16);

};
};
};

Basically when a user positions his mouse over a button, it will fade in, and when he moves the mouse off it, it fades out.

My probem is that when the user positions his mouse over the button, it fades in. But when they move their mouse off it, it stays faded in and doesn’t fade out.

How can I adjust this code so that it acually works with the button fading out.

Attached is my .fla file, the only button that I have setup is the “home” button, the others aren’t adjusted yet.

Hope someone can help me…

I took a look at your fla and all your other buttons seem to fade in and out just fine, the only one that had a problem was your home button which I fixed so it should be fading smoothly now.
Here is your fixed file. =)

Thanks EG… :slight_smile:

But I forgot to mention something…oops…

I had the setup like that before. If you move the mouse over the “Home” button once and click it, it doesn’t work.

If you move the mouse off it, then back on to it, then it works.

Basically what happens is that a user would have to move his mouse over all the buttons, before they are able to click them as a link.

And the other buttons aren’t setup yet, it’s just the “Home” button that I need to work. After I see the actionscript for it, I can setup the other buttons in the same manner.

Hope this sheds some more light on the problem at hand…

Ah ok I see what you’re saying and it seems that the onpress function you had wasn’t responding all of the time so what I did was split up your code. I left the rollover and rollout portion of the code on the timeline like how you had it, but I took the onpress portion and applied it directly to the buttons using the on release actions instead. I went ahead and fixed the first 3 buttons and they work a lot better. Just click on the button to select it and open your actions panel and you’ll see the actions I used. Hope that solves it, here is your fla. =)

BTW, make sure you delete the onpress actions from your orginal codes after you add in the new actions to the button. =)

coolzzzzzzzzzzzzzzzzz…

thanks for the help EG, I do appreciate it alot.

Works like a charm…

btw, wicked website…it ownz…

Happy Holidays <:}

No problem, welcome to Kirupa by the way, I hope you’ll stick around. =)


on(release) {
	getURL("http://www.caribase.com/music.shtml", "_parent");
}

Might I ask what is the use of “_parent” in this code?

I’m not sure, but I think it’s suppose to open the link in the current browser that the link is on instead of opening it in a new browser like “_blank” does.

yeppers…

that’s correct.

_parent = opens it in the same window

_blank = opens it in a new window

_self = opens up in same window

_top = not too sure but this is used with frames