First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
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: S.Saipriya
» Title: Flash Fire Effect
» Description: This tutorial explains about how to create Fire Effect in Flash of Actionscript 2.0.I hope this tutorial helps you!
Featured Sound Loops
Image for equalize

Audio Player

» Author: Aidan Crouzet-Pascal
» Title: Falling Star
» Description: This loop is a cool sounding, E minor loop.
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: Brandan Paulin
» Description: Epic sounding loop with Brass, Percussion, Strings and Winds. This is actually part of a Loop Pack called the Coming where you can download the rest of the loops that go with it FREE from my website.