# If else BUG!

**URL:** <https://forum.kirupa.com/t/if-else-bug/320791>\
**Category:** Uncategorized\
**Created:** [April 1, 2011, 1:54pm UTC](https://forum.kirupa.com/t/if-else-bug/320791 "2011-04-01T13:54:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![outback](https://avatars.discourse-cdn.com/v4/letter/o/9f8e36/32.png) [@outback](https://forum.kirupa.com/u/outback)\
**Post date:** [April 1, 2011, 1:54pm UTC](https://forum.kirupa.com/t/if-else-bug/320791/1 "2011-04-01T13:54:44Z")

</div>

Hi all,

I’m working on a project but the ‘if’ statements aren’t working.

Can anyone help please?

here is the thingI have a scroll bar (scroll\_mc) and inside it I have a dragable circle (circle\_mc) and I have a content that is called (content\_mc)

```auto

var _limit = new Rectangle(0,0,470,0) // -y, -x, +y, +x
var _position
var _divide = 35.2 // 720 (stage) * 25 (screens) 470 (scroll size)

function enter_frame(e){
    _position = scroll_mc.circle_mc.x*_divide
    content_mc.x= 0 - _position
}

scroll_mc.circle_mc.addEventListener(MouseEvent.MOUSE_DOWN, drag_down)

function drag_down (e){ 
    scroll_mc.circle_mc.startDrag(false,limite)
    stage.addEventListener(Event.ENTER_FRAME, enter_frame)
}

stage.addEventListener(MouseEvent.MOUSE_UP, drag_up)

function drag_up (e){
  **if (content_mc****.x > 0 && ****content**** _mc****.x < 360){**
        new Tween (content_mc, "x", Strong.easeInOut, content_mc.x, 0, 1 ,true); 
    }
    **if (****content ****_mc****.x > 360 && ****content**** _mc****.x < 720){**
        new Tween (content_mc, "x", Strong.easeInOut, content_mc.x, 720, 1 ,true); 
    }
    **if (****content ****_mc****.x > 720 && ****content**** _mc****.x < 1080){**
        new Tween (content_mc, "x", Strong.easeInOut, content_mc.x, 720, 1 ,true); 
    }

    scroll_mc.circle_mc.stopDrag() 
    stage.removeEventListener(Event.ENTER_FRAME, enter_frame) 

}

```

the problem is when I stop drag between 0 and 360 or 360 and 720 or 720 and 1080 nothing is happening and I need my content (content\_mc) to reposition with the new tween event any ideas why?
