//InformationTabs import caurina.transitions.Tweener; import flash.display.*; var backX:Number = this.x; var goingOut:Number = 0; var goBack:Number = 0; var speed:Number = 0.6; var fadeInTime:Number = 1; var xPos = this.x; function bringItIn(){ this.visible = true; this.x = 0; Tweener.addTween(this, {x:xPos, time:fadeInTime, transition:"easeoutcubic"}); } this.addEventListener(MouseEvent.MOUSE_OVER, mOverTab); function mOverTab(e:MouseEvent):void{ if (this.goingOut == 0){ Tweener.addTween(this, {x:400, time:speed, transition:"easeoutcubic", onComplete:out}); } goingOut = 1; goBack = 0; } function out():void{ goingOut = 0; if (goBack == 1){ Tweener.addTween(this, {x:backX, time:speed, transition:"easeincubic"}); goBack = 0; } } this.addEventListener(MouseEvent.MOUSE_OUT, mOutTab); function mOutTab(e:MouseEvent):void{ if (goingOut == 1){ goBack = 1; } else{ Tweener.addTween(this, {x:backX, time:speed, transition:"easeincubic"}); } }