0

Okay, I have 4 layers. actions, buttons, circle, and background. I have three buttons on the buttons layer that are each supposed to fill the circle shown in the circle layer, on rollover. The issue that I am having is that when I hover over a button, the rollover animation is partially covered by one of the other buttons or both, dependent upon where they are sitting in the arrangement. I need to somehow bring whichever one is being rolled over to move to the front or to a new layer. enter image description here

As far as coding... I completely removed all of my code. It was :

on(rollOver)
{
    this.swapDepths(1000);
}

on each button

Joseph Spears
  • 41
  • 2
  • 9
  • You can have use Depthmanager to achieve this.Use swapDepths. – Subash Selvaraj Nov 24 '13 at 08:53
  • Didn't even know there was such a thing. I've been googling it for a couple hours and the "best answer" I can find is at: http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00002324.html But I have no idea where to put the coding. Would I apply this to the main timeline? – Joseph Spears Nov 24 '13 at 13:00
  • It would be easy to give suggestions if you attach the screenshot and the code you are using. – Subash Selvaraj Nov 24 '13 at 13:21
  • Added some detail. Hopefully that will make things easier. Thanks! – Joseph Spears Nov 24 '13 at 14:00

1 Answers1

0

Try this.

on(rollOver)
{
    this.swapDepths(_root.getNextHighestDepth());
}

or in the maintimeline

button1.onRollOver = function(){
this.swapDepths(_root.getNextHighestDepth());
}

button2.onRollOver = function(){
this.swapDepths(_root.getNextHighestDepth());
}

button3.onRollOver = function(){
this.swapDepths(_root.getNextHighestDepth());
}

hope this helps

Subash Selvaraj
  • 3,385
  • 1
  • 14
  • 17
  • Yes and no. It works for the first rollover, but then when I go to rollOver one of the others, the previous rolled one is on top. – Joseph Spears Nov 25 '13 at 20:52