# Simple Classes Question

**URL:** <https://forum.kirupa.com/t/simple-classes-question/290919>\
**Category:** flash\
**Created:** [June 22, 2009, 9:27am UTC](https://forum.kirupa.com/t/simple-classes-question/290919 "2009-06-22T09:27:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [June 22, 2009, 9:27am UTC](https://forum.kirupa.com/t/simple-classes-question/290919/1 "2009-06-22T09:27:41Z")

</div>

Hi … Im just getting in to start using classes …  
I have a very simple question::

So if I create a rollOver and rollOff class package - to change the alpha value of some buttons …

how do ‘connect’ them to my buttons?? … if I was simply hard-coding them in I would::

myButton.addEventListener(MouseEvent.MOUSE\_OVER,myFunction);

But this will be tedious with 10 buttons for the on and off states!

Great – simple it must be … thanks for help …/
