# MouseListeners on The Web

**URL:** <https://forum.kirupa.com/t/mouselisteners-on-the-web/228703>\
**Category:** flash\
**Created:** [June 10, 2007, 6:09pm UTC](https://forum.kirupa.com/t/mouselisteners-on-the-web/228703 "2007-06-10T18:09:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joran420](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joran420/32/2329_2.png) [@joran420](https://forum.kirupa.com/u/joran420)\
**Post date:** [June 10, 2007, 6:09pm UTC](https://forum.kirupa.com/t/mouselisteners-on-the-web/228703/1 "2007-06-10T18:09:57Z")

</div>

I cant figure out whats wrong

```auto

mouseListener = new Object();
mouseListener.onMouseWheel = function(delta) {
    var scrollTo = newsBox.news_txt.scroll
	if (delta < 0) {
		scrollTo+=2
		new mx.transitions.Tween(newsBox.news_txt,"scroll",mx.transitions.easing.Regular.easeOut, newsBox.news_txt.scroll, newsBox.news_txt.scroll+2,2)
		
	}
	if (delta > 0) {
		scrollTo-=2
		
		new mx.transitions.Tween(newsBox.news_txt,"scroll",mx.transitions.easing.Regular.easeOut, newsBox.news_txt.scroll, newsBox.news_txt.scroll-2,2)
	}
	var pct = scrollTo/newsBox.news_txt.maxscroll
	var targ_y = Math.floor(344*(pct))+10
	new mx.transitions.Tween(sb,"_y",mx.transitions.easing.Regular.easeOut, sb._y, ty,2)
}
Mouse.addListener(mouseListener);

```

this code works fine in my FLA when i test inside the IDE but when i publish it doesnt listent to the mouse at all that i can tell…(even after clicking to make sure it has focus)
