First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
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;
	}
	scrollIt();
	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!

Comments

  • 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: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
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: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.