Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Adobe Creative Suite

  • Print
  • + Share This
From the author of

Eliminate Flickering Graphics

Use the function updateAfterEvent to force Flash to redraw the screen independent of the movie's frame rate. This eliminates the flicker associated with graphics moving around the screen faster than Flash can update the display, and is especially important when you use a custom pointer. The action updateAfterEvent can only be used with the following clip events: mouseMove, mouseDown, mouseUp, keyDown, and keyUp. Enter one of these clip events as the argument for the updateAfterEvent method.

To update the graphics on screen:

  1. Continue with the previous file created in the previous task. Select the movie clip of the magnifying glass and open the Actions panel.

  2. Select the last setProperty statement under the onClipEvent (mouseMove) handler.

  3. Choose Actions > evaluate. A new statement line appears in the Actions List and an Expression field appears in the Parameters pane.

  4. Choose Functions > updateAfterEvent. The updateAfterEvent function appears in the Expression field.

  5. Enter the event mouseMove within the parentheses of the updateAfterEvent function (Figure 6).

    Figure 6

    Add the updateAfterEvent action to force Flash to refresh the display and create smoother motion.

    Flash updates the graphics on the screen each time the pointer moves, creating smoother motions.


  • Explore using multiple movie clips that track the location of your pointer. For example, a vertical line that follows _xmouse and a horizontal line that follows _ymouse create moving crosshairs.

  • + Share This
  • 🔖 Save To Your Account