fadeOut()

Description

Fade out the object. This is a shorthand for the animate() method. It only passes an object with opacity: 0 to the animate() method. See the animate() method for more details about the arguments.

Return Value

displayObject. Returns the display object itself.

Examples

Example 1

We create a new core instance and a rectangle that we add to the canvas. Then we bind an event handler to the rectangle, which will clear the animation queue and start the fade animation, when it is clicked. With the callback we specify that the background should be red when the animation is complete.