# Buttons & MC's

**URL:** <https://forum.kirupa.com/t/buttons-mcs/5841>\
**Category:** flash\
**Created:** [September 23, 2002, 6:46pm UTC](https://forum.kirupa.com/t/buttons-mcs/5841 "2002-09-23T18:46:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![joso](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@joso](https://forum.kirupa.com/u/joso)\
**Post date:** [September 23, 2002, 6:46pm UTC](https://forum.kirupa.com/t/buttons-mcs/5841/1 "2002-09-23T18:46:17Z")

</div>

i have the following code for an MC, thanks to pom :cool: :

onClipEvent(load){  
ts=175;  
k=.6;  
damp=.8;  
}  
onClipEvent(enterFrame){  
as=(ts-\_xscale)_k;  
vs+=as;  
vs_=damp;  
\_xscale+=vs;  
\_yscale+=vs;  
}

if you create an MC and paste that code in the actions you will see my desired effect…

but i want to adapt the code to work the a button on the rollOver state, so when your cursor moves over the button the above effect takes place. I’ve tried experimenting around but i cant figure it out. :-\ I really need to work on my actionscript skills, i’d really appreciate some help from anyone…

hope you all can help 🙂 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:** [September 23, 2002, 6:53pm UTC](https://forum.kirupa.com/t/buttons-mcs/5841/2 "2002-09-23T18:53:16Z")

</div>

hehe… Ask yourself: how is everything supposed to work, and when. What kind of event handlers you are going to use, etc.

pom 🙂

---

<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:** [September 23, 2002, 7:43pm UTC](https://forum.kirupa.com/t/buttons-mcs/5841/3 "2002-09-23T19:43:46Z")

</div>

give me another clue 😛 lol, ive done changed the onClipEvent to on (rollOver) but the object moves diagnally to the bottom right corner while zooming and it zooms/moves in stages rather than clean and smooth :-\

cheers 🙂

P.S. whats the best way to improve my actionscripting skills ☹ ?

---

<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:** [September 23, 2002, 7:48pm UTC](https://forum.kirupa.com/t/buttons-mcs/5841/4 "2002-09-23T19:48:36Z")

</div>

> \*Originally posted by joso \*  
> \*\*P.S. whats the best way to improve my actionscripting skills ☹ ? \*\*  
> Work, practice, read tutorials, articles, break flas, check the forums… But don’t attempt anything too crazy. 🙂

Hint: Here is how I could describe that effect:

normal state: nothing happens.  
rollover: the button calls the function. It must execute all the time, not simply on the rollover.

This last thing means that you have to manipulate dynamically the enterFrame of the clip…

---

<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:** [September 23, 2002, 11:25pm UTC](https://forum.kirupa.com/t/buttons-mcs/5841/5 "2002-09-23T23:25:25Z")

</div>

at last!!! i have a button looking exactly the way i want it to. thanks pom 🙂

check it out [http://www.liquid2k.com/omd/button.html](http://www.liquid2k.com/omd/button.html)

i have to put each button in an MC though, which is kinda annoying :-\ dunno if theres any other way, but im proud of myself now 😛

thanks…:cool:

---

<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:** [September 24, 2002, 7:42am UTC](https://forum.kirupa.com/t/buttons-mcs/5841/6 "2002-09-24T07:42:31Z")

</div>

Looking very good, man! And with MX, you don’t need to put buttons inside clips or clips inside buttons: you can use clips with buttons handler. Basically, you did it the Flash 5 way (which is good but it’s too bad not to take advantage of the new possibilities).

But that’s really a cool effect. Why don’t you write a tutorial? 🙂

pom :asian:

---

<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:** [September 24, 2002, 11:54am UTC](https://forum.kirupa.com/t/buttons-mcs/5841/7 "2002-09-24T11:54:40Z")

</div>

hehe 🙂 i might just do that, thanks for all your help pom :cool:
