Remove and Add not Working
I am trying to kind of go back and forth, view one chart on button click and I have a back button, when clicked goes back to the main chart. It works the first time but not the second time. Can anyone help me?
function buttonID06Click(e:MouseEvent) {
removeChild(ButID06);
TweenLite.to(MainChart, .5, {x:-210, y: -174, alpha:.06});
TweenLite.from(Chart06, 1.5, {delay:.5, x:0, y:0, alpha:0});
addChild(Chart06);
BackToMain.x = 33
BackToMain.y = 86
TweenLite.from(BackToMain, .5, {alpha:1});
addChild(BackToMain)
BackToMain.addEventListener(MouseEvent.CLICK, BackToMainClick06, false, 0, true);
}
function BackToMainClick06(e:MouseEvent){
addChild(ButID06);
TweenLite.to(MainChart, .5, {x: 0, y: 0, alpha:1});
removeChild(BackToMain);
TweenLite.to(Chart06, .5, {alpha:0});
removeChild(Chart06);
}