Based on what your trying to accomplished you don't have to manage depths. Essentially you can just add your rollover effect inside the shopButton and then once rolled over the shopButton, animate the glow. I udpated your code with the following:
import gs.TweenLite;
import fl.motion.easing.*;
import flash.display.MovieClip;
var shopButton:MovieClip;
var shopButtonRoll:MovieClip;
// Button - places the default state onto the stage
shopButton = new ShopButton();
shopButton.name = "shopButton";
shopButton.x = 262;
shopButton.y = 207;
shopButton.stop();
thumbsMov.addChild(shopButton);
// Button Glow - places rollOver state under the default and with 0 alpha
shopButtonRoll = new ShopButtonRoll();
shopButtonRoll.name = "shopButtonRoll";
shopButtonRoll.alpha = 0;
shopButton.addChild(shopButtonRoll);
// Listeners
shopButton.buttonMode = true;
shopButton.addEventListener(MouseEvent.MOUSE_UP, shopClick);
shopButton.addEventListener(MouseEvent.ROLL_OVER, shopOver);
shopButton.addEventListener(MouseEvent.ROLL_OUT, shopOff);
// Button Actions
// shopOver should bring rollOver to top and animate to 100%
function shopOver(event:MouseEvent):void
{
TweenLite.to(shopButtonRoll, 1, {alpha:1});
}
function shopOff(event:MouseEvent):void
{
TweenLite.to(shopButtonRoll, 1, {alpha:0});
// Code to animate back to 0 then change depth of rollOver to 0
}
function shopClick(event:MouseEvent):void
}
trace("You clicked Shop");
}
Preston
2009-09-10 17:08:38