Welcome, Guest
  • Author Topic: Scrollbar for two textfields PLLZ HELP!!  (Read 2454 times)

    The Master

    • Server what's that
    • *
    • Posts: 19
      • View Profile
      • Email
    Scrollbar for two textfields PLLZ HELP!!
    « on: 04/08/02, 13:18 »
    Hello guys,

    I'm trying to make a scrollbar for two or three textfields but I don't know how to set these textfields as target. They all have the same size so that wouldn't be a problem. Can anyone help me out?

    Flash-db

    • Administrator
    • Systems Administrator
    • *****
    • Posts: 1876
      • View Profile
      • Flash-db.com
    Re:Scrollbar for two textfields PLLZ HELP!!
    « Reply #1 on: 04/09/02, 19:20 »
    Most scrollbars that are available use something like the following code:

    onClipEvent (enterFrame) {
       _root.Results.scroll = Math.round((_y-startY)/size*_root.Results.maxscroll);
    }

    That's on the main MC scrollbar part - then on a button inside of that MC they'll have some additional code.

    The 'Results' part refers to a dynamic text field named 'Results'.  So if you wanted to scroll two of these at once.  Say for example you had two text fields named Text1 and Text2 - you would have something like this:

    onClipEvent (enterFrame) {
       _root.Text1.scroll = Math.round((_y-startY)/size*_root.Text1.maxscroll);
       _root.Text2.scroll = Math.round((_y-startY)/size*_root.Text2.maxscroll);
    }

    Depending on what scroll bar your using you may have to modify other parts.

    The example scrollbar that I described is a fairly common way to make a scrollbar - so you should be able to find one like that.

    The scrollbar I described is part of this download : http://www.flash-db.com/Search/ - It's part of some other items but their is a scrollbar in their somewhere.
    Flash-DB

    The Master

    • Server what's that
    • *
    • Posts: 19
      • View Profile
      • Email
    Re:Scrollbar for two textfields PLLZ HELP!!
    « Reply #2 on: 04/11/02, 09:33 »
    Thanks, your advise was very handy.
    :) :)