First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
Search tutorials
Author: Dan Ludwig | Website: http://www.danludwig.com

Now let's add another scroll feature that allows the user to jump to either the top or the bottom of var_mc, by double-clicking one of the scroll buttons. I have done a little editing to the code that Mick originally sent me, but again, this is his concept. I'll try to explain it as best as I can:

A lot of the code here should look familiar, since the "gotoAnd" actions all work to create the continuous feedback button scrolling functionality. What should stick out is the "getTimer" action, the "if / else" parameters & actions, and the "last_click = first_click" expression. OK, now take a deep breath; and let's tackle"getTimer" first.

up_first_click = getTimer( );

Flash's internal Timer function begins counting upward in milliseconds (ms) as soon as an SWF file begins to load. The "getTimer" action can capture values, in milliseconds, for use in ActionScripts. The above expression sets the variable up_first_click to the Timer value when the top scroll button is clicked. After "getTimer" assigns a numerical value to up_first_click, Flash moves to the third line of code, the "if" clause.



» Level Intermediate

Added: 2000-12-08
Rating: 8 Votes: 94
(10 being the highest)
» Author
Me Like Flash 5. Flash 4 good. Flash 5 better.
» 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.