A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: scrollbar - how to edit scroll height?

  1. #1
    Junior Member
    Join Date
    Oct 2006
    Posts
    6

    scrollbar - how to edit scroll height?

    Hi,

    I've created a movie with a scroll area for text. Upon publishin the movie, the bottom few lines of the text is not displaying. The length of the scrollbar seems to be pre-set, can anyone pls advice on where goes wrong here? Tx.
    Attached Files Attached Files

  2. #2
    Member
    Join Date
    Jan 2006
    Posts
    62
    The length of the scrollbar is pre-set,but you can modify it in "button" MovieClip in Library. It is easy to change it's length.
    And in my computer the bottom few lines displays well.

    The text content is static text.
    I have seen a fla,that loads data from external file,and it scrollbar can change with the text contents.Sounds good.
    Come from PeKing of China

  3. #3
    Junior Member
    Join Date
    Oct 2006
    Posts
    6
    Hi, i think the scroll content in the attached file is pre-set to auto. And i cant find the settings under the "button" movieClip. Could u pls advice in more details? Tx alot!

  4. #4
    Member
    Join Date
    Jan 2006
    Posts
    62
    Do you find the "button" movieClip?
    If you find it,edit that white rectangle.
    Come from PeKing of China

  5. #5
    Junior Member
    Join Date
    Oct 2006
    Posts
    6
    yup.. found it! But the actions on the 'button' says:

    onClipEvent (load) {
    _parent.mc2.mc2.mc2.autoSize = false;
    //so that the textbox autoresize itself
    _parent.mc2.mc2._y = -_parent.mc2.mc2._height/2;
    //_parent.mc2.mc2.m2._y = -_parent.mc2.mc2.m2._height/2;
    //once the textbox autoresized itself this will replace it on the center
    this._x = Math.round(this._x);
    //this roundup the position of the button on the x-axis. Thanks Chris!
    a = this._x;
    b = this._y;
    }
    on (press) {
    this.startDrag(false, a, b, a, _parent.mask._height-this._height);
    //when pressed, the button can be draged in the mask
    }
    on (release) {
    this.stopDrag();
    }
    // These following lines are just to make sure IE don't bug
    on (releaseOutside) {
    this.stopDrag();
    }


    I don't understand which part to edit so that the last few sentences will show. tx again.

  6. #6
    Member
    Join Date
    Jan 2006
    Posts
    62
    I know,
    If you only want to change the scrollbar length,you can modify the button directly.

    If you want to let the scrollbar change automatically with contents,the code above is not usefull.You must rewrite it.
    Come from PeKing of China

  7. #7
    Member
    Join Date
    Jan 2006
    Posts
    62
    look this
    in MovieClip "contener"
    at frame2

    speed = .7;
    mc2.setMask(mask);
    //sets the mask
    createEmptyMovieClip("mc1",this.getNextHighestDept h());

    //creates an empty movie clip
    smoothscroll();
    setInterval(smoothscroll, 40);
    function smoothscroll() {
    mc1._y = speed*(mc1._y-(button._y+mc1._y*(button._height/mask._height)))+(button._y+mc1._y*(button._height/mask._height));
    mc2._y = (1-(mc2._height+200)/mask._height)*mc1._y+mc2._height/2;
    }
    Come from PeKing of China

  8. #8
    Junior Member
    Join Date
    Oct 2006
    Posts
    6
    I see. I wanted the scrollbar to change automatically with contents.

    Is there anyway i can edit from whatever code that's already there to have all the content displayed?

    And if the code is needed to be replace, can u pls direct me to a code that i can use for this instance?

    I'm not familiar with actionscripting.. as i took over this job from my programmer and he's no where to be found!

    Thanks again!

  9. #9
    Member
    Join Date
    Jan 2006
    Posts
    62
    the last line
    mc2._y = (1-(mc2._height+200)/mask._height)*mc1._y+mc2._height/2;
    you can change the value 200 to adapt you want.
    Come from PeKing of China

  10. #10
    Member
    Join Date
    Sep 2000
    Location
    London
    Posts
    48
    I think it's to do with the size of the text instance.

    If you go into the mc2 movie clip and scroll the stage down all the way to the bottom you'll see that the Flash window won't let you go any further down than "New Zealand" - which is where the swf scroll finishes for me.

  11. #11
    Junior Member
    Join Date
    Oct 2006
    Posts
    6
    I tried both method u guys recommend but yet it's still not working!

    When i add "mc2._y = (1-(mc2._height+200)/mask._height)*mc1._y+mc2._height/2;"
    all text appeared missing aft publish.

    As for the scroll limit, i'm able to see all the text even when i'm in the mc2 movieclip.

  12. #12
    Junior Member
    Join Date
    Oct 2006
    Posts
    6

    Is there a max-length text control?

    Hi,

    I'm still not able to solve this issue.

    Just wondering if flash has a default control over the maximum length of any text within each scene?

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