First time here? First time here? Newsletter Signup Newsletter
Search tutorials
Author: Tiran Dagan | Website: http://www.TiranDagan.com

Building the sensitive areas

This is the cool trick of accomplishing the speed control zones in figure 5. We simply place 7 rectangles in to the respective zones, and turn them into MovieClips with attached MovieClip Events. When the user's mouse moves over one rectangle, the code reacts, accelerates or decelerates motion of the doubled-up image.

Here I highlighted the "sensitive area" rectangles for you to see:

Fig. 6 - Speed Zones, Highlighted

What you see in Fig 6 are 7 rectangles (pink shaded, with blue lines surrounding them): 6 narrow ones (3 on each side) and a fat one in the center. These are the "speed zones": Moving your mouse over a rectangles establishes the direction of scrolling and the speed. I have incorporated this with the acceleration/deceleration as noted above to avoid abrupt stops or unnatural motion. So if the user moves the mouse from the fastest left scroll to the stop zone, the image won't freeze - it will decelerate to a stop. After some tinkering I came up with an acceleration parameter which works best of 40 (as in the above script).

Performing an image scroll

To accomplish the scroll, I placed the large image in a movie clip, surrounded it with a rectangular mask and simply move the large image right or left. The mask behave as your viewing window. When you scroll the large image to the left, the users feels like they are moving to the right, and vice versa.

» Level Intermediate

Added: 2001-10-12
Rating: 8.94 Votes: 134
(10 being the highest)
» Author
No details available.
» 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.