First time here? First time here? Newsletter Signup Newsletter
Search tutorials
Author: Vera Fleischer | Website: http://www.mediasparkles.com
Finishing the scroll track

The scroll track is already in place and its instance name is "scroll_track", right? Good! Now let's add the following code to our functions frame:
scroll_track.useHandCursor = false;

scroll_track.onPress = function () {
	rec_y = _root._ymouse - this._parent._y;
	if (rec_y <%gt%> scroll_thumb._y) {
		pressed = 5;
	} else {
		pressed = -5;
	checkIfPressed = setInterval(callBack, 500);

scroll_track.onRelease = scroll_track.onReleaseOutside = stopScroll;
One important thing to note here is that the number 5 in my code is one less than the maximum number of lines that can be displayed in the text field at one time. So if your text fields holds 20 lines, for example, you would use 19 and -19 in your code instead. And that's about it!

On the next page, I'll have a summary of all the code we need, and where it should be.

» Level Advanced

Added: 2002-03-23
Rating: 7 Votes: 116
(10 being the highest)
» Author
I have been flashing for almost two years, first at an online learning company and now at a university. My dream is to one day work for Macromedia as an ActionScript Engineer!
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.