Actionscript Navigation Problem

Hi, i’ve developed a navigation for drinks. I’ve used a system where theare are buttons inside moviesclips so i can use swapDepths and the drinks icons can rotate creating a circular effect.

The source code is here:
http://www.paranoias.org/aaaaaaaaa.fla

The problem is that the buttons have a roll over effect.
If i add this actionscript (it’s commented on the fla)

drink5.onRollOver = function () { { tempo = setInterval( function(){ if (velocidade >= 0) velocidade-= 0.1; }, 30 );} };
drink5.onRollOut = function () { clearInterval(tempo); velocidade = 1.6; };
drink4.onRollOver = function () { { tempo = setInterval( function(){ if (velocidade >= 0) velocidade-= 0.1; }, 30 );} };
drink4.onRollOut = function () { clearInterval(tempo); velocidade = 1.6; };
drink3.onRollOver = function () { { tempo = setInterval( function(){ if (velocidade >= 0) velocidade-= 0.1; }, 30 );} };
drink3.onRollOut = function () { clearInterval(tempo); velocidade = 1.6; };
drink2.onRollOver = function () { { tempo = setInterval( function(){ if (velocidade >= 0) velocidade-= 0.1; }, 30 );} };
drink2.onRollOut = function () { clearInterval(tempo); velocidade = 1.6; };
drink1.onRollOver = function () { { tempo = setInterval( function(){ if (velocidade >= 0) velocidade-= 0.1; }, 30 );} };
drink1.onRollOut = function () { clearInterval(tempo); velocidade = 1.6; };

This is the reduce the speed so it’s stops the movement in a rollover and restart the movement in the rollout animation.

The problem is when this actionscript is applyed the buttons rollover effect don’t work anymore.

Can anyone be assistence ?

Hi xcrap,

I have made your rollovers work by changing your buttons into MovieClips and putting them directly on the Stage.

This may not fit in with your overall project but hope it is of some use.

Thanks alot, you have solved my problem using a different solution

I’ve removed that portion of code and used actionscript inside movieclips like instead of frame1.

on (rollOver) {
tempo = setInterval( function(){ if (_root.velocidade > 0.1) _root.velocidade-= 0.2; }, 30 );
_root.descricao1._alpha = 100;
}
on (rollOut) {
clearInterval(tempo); _root.velocidade = 2;
_root.descricao1._alpha = 0;
}

But it’s a very great solutions, and the visible to stop buttons work while in back of the panel is great. Thank you alot!.