Hi,
I am trying to create an if statement to control whether or not a popup box slides in from offstage or is static. I am using an array to determine if it should, 1=yes, 0=no. The tween works fine all by itself, but as soon as I try to put it into a function, it breaks. What am I doing wrong? Is there a better way to control whether or not it slides in?
Code:
stage.addEventListener (Event.ENTER_FRAME, popSlide);
function popSlide (event:Event):void{
	if (this.slideArray[(currentFrame-1)]==1){
		//next line works by itself, but can't get it to work with the IF statement
		var myTween=new Tween(this.PopUp_mc,"y", Strong.easeOut, 500, 300, 1, true);
	}else{
	this.PopUp_mc.x=50;
	this.PopUp_mc.y=50;
	}
}
Thanks!