Drag And Drop Behaviors

game

This example shows how you can immitate Director-like behaviors in Flash MX using components. Just drag a component movieclip onto another movieclip to have its actions copied to that movieclip to add to its functionality during playback. The rotating planet here has 3 behaviors added to it. One makes it spin, one fades and a third scales the clip when you click your mouse button. A custom method called ASEventBroadcaster is used to assure that multiple behaviors can still function even if they attempt to use the same event (like the onEnterFrame event) for the same movieclip.

Developer: Trevor McCauley
Language: en