DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Coding A Tween
//Tween an object's _y property. This is within the context of a v2 Component, but the same principles also apply elsewhere. Just replace 'this' with the movie clip you want to tween.
import mx.transitions.Tween; import mx.transitions.easing.*; var tween = new Tween(this, "_y", Elastic.easeOut, y, yToMoveTo, 1, true); tween.onMotionFinished = mx.utils.Delegate.create(this, motionFinished);