1. Home
  2. Computing & Technology
  3. Animation

[D-i-Y] Christmas Tree Ornaments that Move with Drag & Drop or Arrow Keypresses

By , About.com Guide

9 of 9

The last thing that you need to do is go back to the scripts for each ornament, and insert one extra line into the on (release) function. That line should assign the current movie clip to _root.active when it's clicked. Rinse and repeat for all of your ornaments and their respective instance names. Since we told the invisible controller’s scripts to move whatever ornament is defined as _root.active when the arrow keys are pressed, this makes sure that the only object that moves on keypress is the one assigned to the variable _root.active.

That’s the end of it. Happy decorating.

Explore Animation
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

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

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Do-It-Yourself
  6. [D-i-Y] Custom Christmas Tree Ornaments that Move with Drag & Drop or Arrow Keypresses

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

All rights reserved.