# Button roll-over effects like Macromedia site?

**URL:** <https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971>\
**Category:** flash\
**Created:** [February 6, 2003, 9:54pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971 "2003-02-06T21:54:22Z")\
**Posts on this page:** 20\
**Page:** 2

<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:** [February 10, 2003, 11:11am UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/21 "2003-02-10T11:11:41Z")

</div>

I am working on my buttons a similar to Soulty’s but it’s far too complicated for me, I think they r over-engineered for a so simple button animations! I couldn’t get them to work as it was trickly to work on which layer, which graphics should convert to and which frames etc. ☹

But I had done a menu, working the same was as Kax’s…it looked great but I would like to make out-animation last a bit longer. I suppose there is a simpler way to make out-animation last longer? Cheers

---

<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:** [February 10, 2003, 11:21am UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/22 "2003-02-10T11:21:22Z")

</div>

hey barnettgs , yeah my style is kinda rough and ragged, because iam not very AS based (not yet anyway, (-: ) , but if you want to make out-animation last longer you might be able to use the code Kax wrote earlier.

```auto

onClipEvent (enterFrame) {
if (this.hitTest (_root._xmouse, _root._ymouse, true)) {
if (!flag) {
this.gotoAndPlay("inAnimation")
flag ++
}
} else {
this.gotoAndPlay("outAnimation")
delete flag
}
}

```

on his original fla , in the movie clip he had one tween, so i though maybe you can have two tweens, one for over and one for out, and use a frame label for out, and then call it in the AS. I have yet to try this, beacause i have been busy with work, but give it a go and tell me how it went. 😏

---

<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:** [February 10, 2003, 12:58pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/23 "2003-02-10T12:58:49Z")

</div>

however … i wouldn’t do that 🙂

you’d be using cpu resources for no reason …  
i’d use a simple onRollOver and onRollOut handlers 😏

by the way … in the script i posted before you’d need another flag in the [color=red]else[/color] statement … i just noted that i didn’t wrote it. once again i wouldn’t do that … besides now the script would be bigger for such a little thing

---

<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:** [February 10, 2003, 1:26pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/24 "2003-02-10T13:26:38Z")

</div>

> 

i’d use a simple onRollOver and onRollOut handlers

hook us up a example, for barnettgs sake, 😉

…hehe

---

<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:** [February 10, 2003, 1:36pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/25 "2003-02-10T13:36:27Z")

</div>

for barnettgs sake … here’s the example 😉

[size=1]\*\*NOTE: \*\*you’re allowed to hit me with a trout after seeing the example … :P[/size]

---

<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:** [February 10, 2003, 1:41pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/26 "2003-02-10T13:41:49Z")

</div>

that file looks o so familiar, lol 😏

---

<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:** [February 10, 2003, 1:46pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/27 "2003-02-10T13:46:09Z")

</div>

really ?? i don’t know why you’re saying such thing …

i just made it from scratch !! 😛

---

<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:** [February 10, 2003, 1:52pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/28 "2003-02-10T13:52:00Z")

</div>

but seriously , is there any other way to do this?

---

<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:** [February 10, 2003, 2:03pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/29 "2003-02-10T14:03:31Z")

</div>

there’s **always** another way to do everything 🙂

i have something in mind but i’ll test it later … i’m supposed to be working right now :sure:

---

<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:** [February 10, 2003, 10:10pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/30 "2003-02-10T22:10:56Z")

</div>

thanks for trying to help me out! 😉

Also there is one thing I forgot about, is linking them up. How do I link buttons up in action script? I haven’t done them before.

Cheers

---

<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:** [February 14, 2003, 3:18am UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/31 "2003-02-14T03:18:06Z")

</div>

Ok, I have done it now…using ‘roll over’ and ‘roll out’ functions in Action Script.

It works fine with normal mouse movement but if I move mouse across button too fast, it will flash instead of glowing. So I know it isn’t same as macromedia site as they don’t flash if you move mouse too fast.

So here is my Fla file shown below and see if there is something wrong with it. Thanks!

---

<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:** [February 14, 2003, 4:56am UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/32 "2003-02-14T04:56:41Z")

</div>

thats great dude, nice work, one question , how did you make flash go into those movie clips and use goto statements???

dnt u usually use

onClipEvent (enterFrame)

---

<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:** [February 14, 2003, 11:37am UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/33 "2003-02-14T11:37:16Z")

</div>

> \*Originally posted by Soulty \*  
> \*\*thats great dude, nice work, one question , how did you make flash go into those movie clips and use goto statements???

dnt u usually use

onClipEvent (enterFrame) \*\*

I had tried OnClipEvent, it’s bit complicated for me to use it…how do I enable rollout with these code like OnClipEvent? But I suppose it will be same effect?

The reason its ‘flash’ because I move mouse on it, first few frames playing but when mouse moves out too early, it jumps to frame 17 making it flash rather than playing it all the way from 2 to 16 then goes dim from 17 to 32.

---

<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:** [February 14, 2003, 1:33pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/34 "2003-02-14T13:33:26Z")

</div>

yeah i knew about the flash thing, just curious on how u made the movie a button without using onClipEvent, but i guess u can use movie clips as buttons in flash MX, didnt really think about that.

---

<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:** [February 15, 2003, 2:36pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/35 "2003-02-15T14:36:33Z")

</div>

> \*Originally posted by Soulty \*  
> \*\*yeah i knew about the flash thing, just curious on how u made the movie a button without using onClipEvent, but i guess u can use movie clips as buttons in flash MX, didnt really think about that. \*\*

I can see what u mean. I guess I am using rollover/rollout because I intended to use it as a button. Anyway, I will figure out a way to prevent button ‘flashing’ if mouse move across fast.  
Cheers

---

<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:** [February 15, 2003, 2:51pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/36 "2003-02-15T14:51:22Z")

</div>

> posted by **Soulty**  
> but seriously , is there any other way to do this?

=)

---

<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:** [February 15, 2003, 2:58pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/37 "2003-02-15T14:58:16Z")

</div>

lol

Nice, so you got it workin, even does the small fade when you quickly pass over it. nice work! 🙂 🙂

:::but seriously if there another way to do this?? ,

hehehe , lol :crazy:

---

<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:** [February 15, 2003, 3:03pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/38 "2003-02-15T15:03:01Z")

</div>

lol 😛

actually i had the file two days ago … i forgot to reply until i saw this thread again a few minutes ago :crazy:

---

<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:** [February 15, 2003, 3:05pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/39 "2003-02-15T15:05:07Z")

</div>

lucky you did , cant let talent go to waste!

by the way , why is your framerate on your timeline sooooooooooo BIG???

48fps?? that would make not so good computer choke on a preloader!😏

---

<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:** [February 15, 2003, 3:08pm UTC](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971/40 "2003-02-15T15:08:13Z")

</div>

you think so ?? that’s my default fps =)

i like fast and smooth animations. but i change to 24 almost everytime i do something for the forums

[Previous page](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971.md?page=1)

[Next page](https://forum.kirupa.com/t/button-roll-over-effects-like-macromedia-site/12971.md?page=3)
