A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Scrollpane text mc - actionscript

  1. #1
    Senior Member
    Join Date
    Mar 2001
    Posts
    536

    Scrollpane text mc - actionscript

    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?

    Code:
    // 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)) * 100;
    
    // 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();
    }
    
    }

  2. #2
    Senior Member
    Join Date
    Mar 2001
    Posts
    536
    Here is the file I'm working with can anyone see what the problem is?

    FLA
    http://www.gaygraphicartists.com/scroll-test.fla

    ZIP
    http://www.gaygraphicartists.com/scroll-test.fla.zip

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center