1. Home
  2. Computing & Technology
  3. Animation

Flash Cursor Spotlight

By Adrien-Luc Sanders, About.com

10 of 10

All that remains is to tell Flash to stop dragging when the mouse leaves or stops dragging over the defined area.

on (rollOut, dragOut) {
stopDrag( ) ;
}

This lets the user “escape” by just moving the mouse away from the spotlight area. It also keeps the edges of the rectangle from showing, as long as you’ve made it large enough, because the spotlight will be forced to stop at the stage’s edges when the user’s cursor leaves the Flash movie—it can’t drag it any further beyond.

Try it out here.

Explore Animation
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Flash Cursor Spotlight

©2009 About.com, a part of The New York Times Company.

All rights reserved.