A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: UI scrollbar - and move function?

  1. #1
    Bob (the singing sock)
    Join Date
    Aug 2000
    Location
    Århus, Denmark
    Posts
    472
    I'm using the scrollbar to trigger a function that controls some mcs.

    I found a variable in the scrollbar that lets me know when the bar is being moved:

    _level0.scrollbar.isScrolling (is either true or false)

    Now I can't find the variable that tells me when either the up or the down button is being pressed?
    Any clues out there?

  2. #2
    Poof! Whaddya need? I'mFine's Avatar
    Join Date
    May 2001
    Posts
    345

    got it!

    Double-click the scrollbar component in your movie's library, view its actions.

    Find this function definition at line 191 in the AS:
    Code:
    FScrollBarClass.prototype.scrollIt = function (inc, mode)
    Before the ending curly brace, insert the following:
    Code:
    _root.scrolling=true;
    Now find this function definition at line 264:
    Code:
    FScrollBarClass.prototype.stopScrolling = function()
    Before the ending curly brace, insert the following;
    Code:
    _root.scrolling=false;
    You will now be able to reference your newly created _root.scrolling variable in your scripts.

    There may be a more elegant way, but this works.

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