# Scrollbar in AS 3.0

**URL:** <https://forum.kirupa.com/t/scrollbar-in-as-3-0/229675>\
**Category:** flash\
**Created:** [June 19, 2007, 1:01pm UTC](https://forum.kirupa.com/t/scrollbar-in-as-3-0/229675 "2007-06-19T13:01:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgooddesign](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@tgooddesign](https://forum.kirupa.com/u/tgooddesign)\
**Post date:** [June 19, 2007, 1:01pm UTC](https://forum.kirupa.com/t/scrollbar-in-as-3-0/229675/1 "2007-06-19T13:01:19Z")

</div>

I’m trying to make a custom scrollbar thing, and I’m reasonably new to AS, I found a sample of how to make one that works in AS 2.0 [here](http://www.kirupa.com/forum/showthread.php?t=48562&) and I’ve been trying to convert it to work with AS 3.0, I think I almost have it but I am getting an error 1152: a conflict exists with inherited definition flash.dislplay: DisplayObject.y in namespace public

my code is below

```auto
var loadFaqs:URLLoader = new URLLoader(new URLRequest("faq.txt"));
loadFaqs.addEventListener(Event.COMPLETE, completeFaqHandler);
loadFaqs.dataFormat = URLLoaderDataFormat.TEXT
function completeFaqHandler(event:Event):void {
 txtServicesContent.condenseWhite = true;
 txtServicesContent.htmlText = event.target.data as String;
}
txtServicesCaption.text = "FAQ";
//beginning of code for scrollbar from kirupaForum user claudio
fscommand("allowscale", "false");
bar.useHandCursor = dragger.useHandCursor=false;
var y = dragger._y;
var maxy:int = bar._y+bar._height-dragger._height;
 
function moveDragger() {
 var r:int = (dragger._y-y)/(bar._height-dragger._height);
 txtServicesContent.scroll = Math.round(r*txtServicesContent.maxscroll);
}
dragger.onPress = function() {
 var ref:String = this._parent;
 this.startDrag(false, this._x, ref.y, this._x, ref.y+ref.bar._height-this._height);
 var id = setInterval(moveDragger, 50);
};
dragger.onMouseUp = function() {
 this.stopDrag();
 clearInterval(id);
};
 
 
bar.onPress = function() {
 ref = this._parent;
 ref.dragger._y = ref._ymouse>ref.maxy ? ref.maxy : ref._ymouse;
 id = setInterval(moveDragger, 10);
};
bar.onMouseUp = function() {
 clearInterval(id);
};

```
