# Scrollpane text mc - actionscript

**URL:** <https://forum.kirupa.com/t/scrollpane-text-mc-actionscript/198958>\
**Category:** Uncategorized\
**Created:** [August 30, 2006, 1:16am UTC](https://forum.kirupa.com/t/scrollpane-text-mc-actionscript/198958 "2006-08-30T01:16:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keith30](https://avatars.discourse-cdn.com/v4/letter/k/7ea924/32.png) [@Keith30](https://forum.kirupa.com/u/Keith30)\
**Post date:** [August 30, 2006, 1:16am UTC](https://forum.kirupa.com/t/scrollpane-text-mc-actionscript/198958/1 "2006-08-30T01:16:47Z")

</div>

I’m having trouble scrolling. When I scroll my mc it the text turn invisible 1/2 way down.  
The mc is 2783 pixels in height. I do not see why it should be limited if code is set to 100.

Can anyone please help me?

```auto
// Yes, this is a constant loop...
onClipEvent (enterFrame) {

// What's the maximum scroll value based on the content height?
scrollMax = int(this._parent.content._height - this._parent.maskclip._height);

// This is the draggable button used to scroll the content clip.
// Here we set it's height based on the height of the content.
this._parent.scrollDragButton._yscale = int((this._parent.scrollTrack._height / this._parent.content._height) * 100);

// Grab the current position of the draggable button.
position = this._parent.scrollDragButton._y;

// Set the scroll percentage value based on the current position
// of the draggable button and the height of the track and button.
percentage = ((position-this._parent.scrollTrack._Y) / (this._parent.scrollTrack._height - this._parent.scrollDragButton._height)) * 50;

// Set the percentage for the content clip to be moved to.
movePercentage = -(int((percentage * this.scrollMax) / 100));

// Move the content clip.
this._parent.content._y = int(movePercentage);

// Just for effect... Can be removed without issue.
this._parent.scrollTrackButtons._alpha = percentage;

// Check to see if the scroller is needed...
if(this._parent.maskClip._height > this._parent.content._height){
	this._parent.hideScroller();
}else{
	this._parent.showScroller();
}

}

```
