No me funciono grrrrrrrr!!!
te comento lo que hice ...
ubique la varible al final con las otras donde iba ...
public var sonido:flash.media.Sound;
Exporte el sonido ...
Nombre en biblioteca SoundFX
Clase: sound
Clase base:flash.media.Sound
y luego coloque el resto asi ...
Código :
public function menuOver(arg1:flash.events.MouseEvent):void
{
sonido:Sound = new SoundFX();
sonido.play();
var loc1:*=0;
var loc2:*=0;
var loc3:*=null;
var loc4:*=undefined;
this.subTimer.stop();
if (this.subOpen && !(arg1.currentTarget.index == this.curSubOpen))
{
this.clearSubmenu();
}
this.header.subMenuHolder.visible = true;
caurina.transitions.Tweener.addTween(arg1.currentTarget.bg, {"_color":"0x" + this.xml.settings.@menuButtonsBgOverColor, "alpha":this.xml.settings.@menuButtonsBgOverAlpha, "y":-15, "scaleY":2.2, "time":0.5, "transition":"easeOutExpo"});
caurina.transitions.Tweener.addTween(arg1.currentTarget.menuItemGloss, {"y":-15, "scaleY":2.2, "alpha":0.55, "time":0.5, "transition":"easeOut"});
if (!(this.menuList[arg1.currentTarget.index].submenu.length() == 0) && !(arg1.currentTarget.index == this.curSubOpen))
{
loc1 = this.menuList[arg1.currentTarget.index].submenu.length();
this.header.subMenuHolder.x = arg1.currentTarget.destX + this.header.menuHolder.x;
loc2 = 0;
while (loc2 < loc1)
{
(loc3 = new menuItem()).index = loc2;
loc3.txt.autoSize = flash.text.TextFieldAutoSize.LEFT;
loc3.txt.text = this.menuList[arg1.currentTarget.index].submenu[loc2].@page_title;
loc3.bg.width = loc3.txt.textWidth + 10;
loc3.menuItemGloss.width = loc3.txt.textWidth + 10;
loc4 = "0x" + this.xml.settings.@submenuButtonsTextColor;
loc3.txt.textColor = loc4;
caurina.transitions.Tweener.addTween(loc3.bg, {"_color":"0x" + this.xml.settings.@submenuButtonsBgColor, "alpha":this.xml.settings.@submenuButtonsBgAlpha, "time":0});
loc3.y = -25;
loc3.alpha = 0;
loc3.destY = loc2 * 30 + 5;
this.header.subMenuHolder.addChild(loc3);
caurina.transitions.Tweener.addTween(loc3, {"y":loc3.destY, "_bezier":{"y":150}, "alpha":1, "time":0.7, "delay":loc2 * 0.1, "transition":"easeOutExpo"});
loc3.buttonMode = true;
loc3.mouseChildren = false;
loc3.addEventListener(flash.events.MouseEvent.ROLL_OVER, this.subOver,sndOver, false, 0, true);
loc3.addEventListener(flash.events.MouseEvent.ROLL_OUT, this.subOut, false, 0, true);
loc3.addEventListener(flash.events.MouseEvent.MOUSE_DOWN, this.subReleased, false, 0, true);
++loc2;
}
this.subOpen = true;
}
this.curSubOpen = arg1.currentTarget.index;
return;
}
Y despues nose si entendi bien de tanto mirar tutoriales cree una nueva public fun
Código :
public function sndOver(arg1:flash.events.MouseEvent):void
{
var sonido:Sound = new SoundFX();
sonido.play();
}
y coloque lo siguiente en la function menuOver...
Código :
loc3.addEventListener(flash.events.MouseEvent.ROLL_OVER, this.subOver,sndOver, false, 0, true);
loc3.addEventListener(flash.events.MouseEvent.ROLL_OUT, this.subOut, false, 0, true);
loc3.addEventListener(flash.events.MouseEvent.MOUSE_DOWN, this.subReleased, false, 0, true);
PERO TAMPOCO FUNCIONOO!!!