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 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
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);
};