1. Home
  2. Computing & Technology
  3. Animation

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

By Adrien-Luc Sanders, About.com

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

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. 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.