# Simple RollOver

**URL:** <https://forum.kirupa.com/t/simple-rollover/253530>\
**Category:** flash\
**Created:** [March 2, 2008, 5:43pm UTC](https://forum.kirupa.com/t/simple-rollover/253530 "2008-03-02T17:43:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![craig\_clayton](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@craig\_clayton](https://forum.kirupa.com/u/craig_clayton)\
**Post date:** [March 2, 2008, 5:43pm UTC](https://forum.kirupa.com/t/simple-rollover/253530/1 "2008-03-02T17:43:51Z")

</div>

I know I am missing something but I cant seem to figure it out. I have 5 movieclips on my stage and they all have the same labels inside of the movieclips. So I want to create one rollover and one rollout for all them instead of having to create one for each. Here is my code:

```auto

myestateMC.addEventListener(MouseEvent.ROLL_OVER, servicesOver);
myestateMC.addEventListener(MouseEvent.ROLL_OUT, servicesOff);

function servicesOver(event:MouseEvent):void {
    this.gotoAndPlay("rollOn");
    this.buttonMode = true;
}

function servicesOff(event:MouseEvent):void {
    this.gotoAndPlay("rollOff");
}

```

The problem is right now when I rollover its trying to access the main timeline instead of the movieclip. I know its something simple but for some reason I cant get it working right. PLEASE HELP!!! I am still getting use to classes and that is where I would like all my code to go but for right now I would like it go on the timeline.

Thanks in advance.
