What’s Happening with the buttons? when i click for a instants the color stays green in the buttons 8-]
I have this
var ativo:MovieClip = teste2;
ativo.gotoAndStop(5);
var swf:MovieClip;
var loader:Loader = new Loader();
var defaultSWF:URLRequest=new URLRequest("swfs/teste2.swf");
addChild(loader);
loader.load(defaultSWF);
function btnClick(event:MouseEvent):void {
if (ativo != null) {
if (event.currentTarget.name != ativo.name) {
event.currentTarget.gotoAndPlay(2);
trace(event.currentTarget.name);
defaultSWF = new URLRequest("swfs/"+event.currentTarget.name+".swf");
loader.load(defaultSWF);
ativo.gotoAndPlay(6);
ativo = MovieClip(event.currentTarget);
}
} else {
event.currentTarget.gotoAndPlay(2);
trace(event.currentTarget.name);
defaultSWF = new URLRequest("swfs/"+event.currentTarget.name+".swf");
loader.load(defaultSWF);
ativo = MovieClip(event.currentTarget);
}
}
teste.addEventListener(MouseEvent.CLICK, btnClick);
teste2.addEventListener(MouseEvent.CLICK, btnClick);
teste3.addEventListener(MouseEvent.CLICK, btnClick);
teste.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
teste.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);
teste2.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
teste2.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);
teste3.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
teste3.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);
function onButtonOver(e:MouseEvent):void {
if (e.currentTarget.name != ativo.name) {
e.currentTarget.gotoAndPlay(2);
}
}
function onButtonOut(e:MouseEvent):void {
if (e.currentTarget.name != ativo.name) {
e.currentTarget.gotoAndPlay(6);
}
}
and the example
http://rapidshare.com/files/291927039/teste.fla.html