rt flash.events.MouseEvent;
import fl.motion.MotionEvent;
import flash.net.URLRequest;
import flash.events.Event;
boton_menu1.removeEventListener(MouseEvent.ROLL_OVER,activar);
activador_menu1_btn.addEventListener(MouseEvent.ROLL_OVER,desactivar);
function desactivar (event:MouseEvent):void
{
gotoAndPlay("fuera");
}
var Xpos:Number = 530;
var Ypos:Number = 220;
var swf:MovieClip;
var loader:Loader=new Loader();
var defaultSWF:URLRequest= new URLRequest("swfs/boton_submenu1.swf.swf");
loader.load(defaultSWF);
loader.x=Xpos;
loader.y=Ypos;
addChild(loader);
/////////////////// BOTON FUNCION UNIVERSAL ///////////////////////////
function btnClick(event:MouseEvent):void {
removeChild(loader);
var newSWFRequest:URLRequest= new URLRequest("swfs/"+ event.target.name+ ".swf");
loader.load(newSWFRequest);
loader.x=Xpos;
loader.y=Ypos;
addChild(loader);
}
///////////////////// Boton listeners /////////////////////////////////////////////////
boton_submenu1.addEventListener(MouseEvent.CLICK, btnClick);
boton_submenu2.addEventListener(MouseEvent.CLICK, btnClick);