0 Replies Latest reply on Jan 13, 2009 5:35 PM by BeniRose

    swapDepths not working

    BeniRose Level 1
      Ok, so I am trying to bring an object to the front of the screen when it's clicked on by using the following code:


      which seemed to be working fine until I spread it across objects. I have two objects in seperate AS files, ItemGroup and ItemBox. ItemGroup obviously contains multiple ItemBoxes. ItemGroup has a movie clip, group_mc, that is passed to all the ItemBoxes and this is what the ItemBox _mc is a child of. So when I do _mc._parent from within ItemBox, it's referencing the group_mc MovieClip that's inside of ItemBox. I thought maybe that's why it wasn't working, but when I did a trace on _mc._parent.getNextHighestDepth() from within ItemBox, it traces fine, but for some reason it doesn't seem to be working in the swapDepths. Is there any obvious reason why this shouldn't work?