So here is what I am doing.
You click a navigation button on the screen
(artclassNav, eventsNav, exhibitionNav, museumNav)
A box slides onto the screen (infoBox) and the appropriate text fades in
(artclassTxt, eventsTxt, exhibitionTxt, museumTxt)
On the infoBox is a close button (closeNav) which when clicked makes the text and the infoBox go bye bye.
My problem:
closeNav works correctly the first time and maybe the third, but eventually it becomes seemingly random if the text will pop up… infoBox slides in, but text may or may not appear.
Here is my code for the closeNav as of now
infoBox.closeBox.addEventListener(MouseEvent.CLICK, close_CLICK);
function close_CLICK(e:MouseEvent):void
{
Tweener.addTween(infoBox, {x: infoBox.x - 1000, time:1, transition:"easOutBack"});
Tweener.addTween(artclassTxt, {_autoAlpha:0, time:1, transition:"easeOut"});
Tweener.addTween(eventTxt, {_autoAlpha:0, time:1, transition:"easeOut"});
Tweener.addTween(exhibitionTxt, {_autoAlpha:0, time:1, transition:"easeOut"});
Tweener.addTween(museumTxt, {_autoAlpha:0, time:1, transition:"easeOut"});
}
I have tried a few different ways of using removeChild and using if statements… but I’m new to coding, lowly print designer I am. But I’m trying… Please help!