lets you have 5 movieclips and you have named all of your movieclips on the stage as mc1, mc2, mc3 etc. then you can associate an ID with each button which can be used inside the sourceGlassOver handler function to show the respective movieclip. For I give an ID value of 1 to sourceGlass_mc, like:
sourceGlass_mc.ID = 1;
sourceGlass_mc.addEventListener(MouseEvent.ROLL_OVER, sourceGlassOver);
function sourceGlassOver(event:MouseEvent):void
{
for(var i:Number=0;i<5;i++){
if( "mc"+event.currentTarget.ID == MovieClip(this.getChildByName("mc"+(i+1))).name.substr(2) ){
MovieClip(this.getChildByName("mc"+(i+1))).visible = true;
}
}
}
sourceGlass_mc.buttonMode = true;
If you are creating movieclips and buttons through actionscript then it can be more easy by storing them in arrays. There can be many other ways to achieve what you are trying to.
Sher Ali
Flash & Flex Developer
My FlashDen Portfolio
website:
http://www.webeyestudio.com
blog:
http://www.kabulinteractive.com/blog