# Simple Custom Scrollbar

**URL:** https://forum.kirupa.com/t/simple-custom-scrollbar/193590
**Category:** flash
**Created:** [July 14, 2006, 11:30am UTC](https://forum.kirupa.com/t/simple-custom-scrollbar/193590 "2006-07-14T11:30:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![moyger](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@moyger](https://forum.kirupa.com/u/moyger)
#### Post date: [July 14, 2006, 11:30am UTC](https://forum.kirupa.com/t/simple-custom-scrollbar/193590/1 "2006-07-14T11:30:36Z")

</div>

I am so happy that ive found this site to know everything about flash/xml/php. It really helps me a lot. I was so happy ive finally found a very simple MovieClip Scrollbar. Anyway, what I want to add to this script is how to add an external image to the content which is under the movieclip “contentMain”.

I was thinking to add this script that I also learn from this site but I dont know how to pass the variable to the content of the scrollbar.

I hope someone could help me. It will be a great help. Thanks.

MovieClip.prototype.fadeIn = function() {  
this.onEnterFrame = function() {  
if (this.\_alpha\<100) {  
this.\_alpha += 10;  
} else {  
delete this.onEnterFrame;  
}  
};  
};  
bar.\_visible = false;  
border.\_visible = false;  
var empty = this.createEmptyMovieClip(“container”, “100”);  
empty.\_x = 0;  
empty.\_y = 0;  
contentMain = new MovieClipLoader();  
preload = new Object();  
contentMain.addListener(preload);  
preload.onLoadStart = function(targetMC) {  
trace("started loading "+targetMC);  
container.\_alpha = 0;  
bar.\_visible = true;  
border.\_visible = true;  
pText.\_visible = true;  
};  
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {  
bar.\_width = (lBytes/tBytes)\*100;  
pText.text = “% “+Math.round((lBytes/tBytes)\*100);  
};  
preload.onLoadComplete = function(targetMC) {  
container.fadeIn();  
border.\_visible = false;  
bar.\_visible = false;  
dText.\_visible = false;  
trace(targetMC+” finished”);  
};  
//default image  
contentMain.loadClip(“graco\_products.jpg”, “container”);
