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 |
| » Author |
| Me Like Flash 5. Flash 4 good. Flash 5 better. |
| » Download |
| Download the files used in this tutorial. |
| Download (229 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


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