# A better way to do this?

**URL:** <https://forum.kirupa.com/t/a-better-way-to-do-this/229724>\
**Category:** flash\
**Created:** [June 19, 2007, 7:16pm UTC](https://forum.kirupa.com/t/a-better-way-to-do-this/229724 "2007-06-19T19:16:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![renis](https://avatars.discourse-cdn.com/v4/letter/r/6bbea6/32.png) [@renis](https://forum.kirupa.com/u/renis)\
**Post date:** [June 19, 2007, 7:16pm UTC](https://forum.kirupa.com/t/a-better-way-to-do-this/229724/1 "2007-06-19T19:16:01Z")

</div>

The only thing I would like to recreate is the yellow “people” tab and its functionality (have it pop out and still select the options inside then go back when you roll out). I would like to get this working for several tabs but am having a bit of trouble. I am using the “onMouseMove” which is causing it to move a bit slowly. Can anyone help me find a better way to do this? Here is the link to the example I mentioned and my actionScript so far:

[http://www.ingestorey.com/](http://www.ingestorey.com/)

this.onMouseMove = function() {  
var bound1:Object = strength\_btn.getBounds(this);  
var bound2:Object = cleanliness\_btn.getBounds(this);  
var bound3:Object = productivity\_btn.getBounds(this);  
var bound4:Object = mainenance\_btn.getBounds(this);  
if (this.\_ymouse\>bound1.yMin && this.\_ymouse\<bound1.yMax && this.\_xmouse\<bound1.xMax && this.\_xmouse\>bound1.xMin) {  
var up1:Tween = new Tween(strength\_btn, “\_y”, Strong.easeOut, strength\_btn.\_y, 69, .5, true);

```
} else {
	var down1:Tween = new Tween(strength_btn, "_y", Strong.easeOut, strength_btn._y, 264.1, .5, true);
	
}

```

if (this.\_ymouse\>bound2.yMin && this.\_ymouse\<bound2.yMax && this.\_xmouse\<bound2.xMax && this.\_xmouse\>bound2.xMin) {  
var up2:Tween = new Tween(cleanliness\_btn, “\_y”, Strong.easeOut, cleanliness\_btn.\_y, 69, .5, true);

```
} else {
	var down2:Tween = new Tween(cleanliness_btn, "_y", Strong.easeOut, cleanliness_btn._y, 264.1, .5, true);
	
}

```

};  
}

Any help is greatly appreciated!

Thanks,  
renis
