Inside the
on command, insert a
startDrag command so that when the parameters of the
on command are met, the object starts to drag after the mouse cursor to follow it over the stage. Initially there will be no target; only empty quotes (). Because we want the entire black area surrounding the spotlight to move when the mouse cursor is over the spotlight, we need to tell Flash to go back up to the root level to find the target, which is the instance of the entire black area (named as _root.blackthe pointer to the root level, and then the instance name) and not just the symbol covering the transparent area inside.
on (rollOver, dragOver) {
startDrag (_root.black, true) ;
}
See that extra true in there? Thats there because Ive checked off Lock Mouse to Center, so that when we mouse over the area in question, the cursor should automatically orient towards the center of the symbol.