# FLASH CS5, AS3 Movieclip change on multiple rollovers

**URL:** <https://forum.kirupa.com/t/flash-cs5-as3-movieclip-change-on-multiple-rollovers/314981>\
**Category:** flash\
**Created:** [October 14, 2010, 2:59am UTC](https://forum.kirupa.com/t/flash-cs5-as3-movieclip-change-on-multiple-rollovers/314981 "2010-10-14T02:59:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jesscee](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@Jesscee](https://forum.kirupa.com/u/Jesscee)\
**Post date:** [October 14, 2010, 2:59am UTC](https://forum.kirupa.com/t/flash-cs5-as3-movieclip-change-on-multiple-rollovers/314981/1 "2010-10-14T02:59:49Z")

</div>

Hi there!

I’m having a bit of trouble coming up with a solution for a movieclip that I have set to have a rollover function. The first initial rollover changes to a frame of another movieclip on the main timeline. I have a set of buttons at the top, each changing to to a different frame on the main timeline upon rollover. What I would like to do, is somehow link the movieclip rollover to change when the top set of buttons changes as well.

I also want to keep the feature of being able to click on the movieclip rollover again and it stops displaying the linked movieclip.

Here’s a link to my work in progress so you can get a better understanding of my setup (the grey button in the left corner is the movieclip rollover I’m talking about):

> **[Flash](http://jesscee.deviantart.com/art/Flash-182554427)**
>
> .

Here is the code I am currently using on my initial movieclip rollover:

```auto

this.addEventListener(MouseEvent.MOUSE_OVER, OVER)
this.addEventListener(MouseEvent.MOUSE_OUT, OUT)
this.addEventListener(MouseEvent.CLICK, GO)

function GO(e:Event):void{

MovieClip(root).POPS1_mc.gotoAndPlay("hovers")

}

this.buttonMode = true

function OVER(e:Event):void{

	play();
}

function OUT(e:Event):void{
		
	this.addEventListener(Event.ENTER_FRAME, OUTfade);
}

function OUTfade(e:Event):void{
	if (currentFrame == 1) {
		
			
		this.removeEventListener(Event.ENTER_FRAME, OUTfade);
		}
		
	
		else{
	prevFrame();
		}
}

[/END CODE]
Any help would be VERY very much appreciated! [img]/uploads/kirupa/4621/957302be0b3c73bb.gif[/img]
```
