# Movie clip near the edge problem

**URL:** https://forum.kirupa.com/t/movie-clip-near-the-edge-problem/267410
**Category:** Uncategorized
**Created:** [July 31, 2008, 7:25pm UTC](https://forum.kirupa.com/t/movie-clip-near-the-edge-problem/267410 "2008-07-31T19:25:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Mediashock](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Mediashock](https://forum.kirupa.com/u/Mediashock)
#### Post date: [July 31, 2008, 7:25pm UTC](https://forum.kirupa.com/t/movie-clip-near-the-edge-problem/267410/1 "2008-07-31T19:25:00Z")

</div>

I have a tooltip bubble and when its called near the edge that items tooltip is too long … so what i was thinking to do is just move the tooltips xposition to whatever the width is - current mouse position … so here is my code… it detects the edge just fine

```auto

function updateTip(e:Event):void{
		
		if(tooltip.x + tooltip.width > stage.stageWidth){
			TweenLite.to(tooltip,0.5,{autoAlpha:1,x:stage.mouseX-tooltip.width,y:stage.mouseY-15});
		}else{
			TweenLite.to(tooltip,0.5,{autoAlpha:1,x:stage.mouseX+10,y:stage.mouseY-15});
		}
	}

```

the problem is when it tweens to the visible location the ELSE statement kicks in and tells it to go back to the mouse position… mmmmm so its flickering…

anyone got suggestions?
