# Equality, inequality (confused)

**URL:** <https://forum.kirupa.com/t/equality-inequality-confused/316491>\
**Category:** Uncategorized\
**Created:** [November 23, 2010, 12:14pm UTC](https://forum.kirupa.com/t/equality-inequality-confused/316491 "2010-11-23T12:14:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aeson](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aeson](https://forum.kirupa.com/u/aeson)\
**Post date:** [November 23, 2010, 12:14pm UTC](https://forum.kirupa.com/t/equality-inequality-confused/316491/1 "2010-11-23T12:14:35Z")

</div>

Good day to all of you experts out there,

I am quiet new to as3 and I am trying to write my code as efficient as possible and I have a scenario where I am not familiar with all the operators and need advice.

## Here is the scenario:

import fl.transitions.Tween;  
import fl.transitions.easing.\*;  
import flash.events.Event;

//functions\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

function animate():void {  
var squareTweenX:Tween = new Tween(square\_mc,“x”,Elastic.easeOut,square\_mc.x,mouseX,1,true);  
var squareTweenY:Tween = new Tween(square\_mc,“y”,Elastic.easeOut,square\_mc.y,mouseY,1,true);  
}

function anim(evt:Event):void {  
if ( (mouseX \> 0) && (mouseX \< 550) (mouseY \> 0) && (mouseY \< 400) )  
{  
animate();  
trace(“whitin boundary”);  
}  
else  
{  
var reset:Tween = new Tween(square\_mc,“x”,Elastic.easeOut,square\_mc.x,256.5,2,true);  
}  
}

//listeners\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

stage\_mc.addEventListener(MouseEvent.MOUSE\_MOVE, anim);

* * *

Now this piece of code never reaches the else condition. I want it to go to “else” condition as soon as either one of those initial 4 values returns false.

Which operator would do the job or am I missing something else entirely?

Thanks in advance to anyone who replies.

Aeson
