Return to Snippet

Revision: 62841
at March 15, 2013 22:19 by adehaas


Initial Code
package nl.hnk.animations
{
	import com.greensock.TweenLite;
	import com.greensock.easing.Sine;

	import flash.display.Sprite;

	/**
	 * @author alexanderdehaas
	 */
	public class ContentHover extends Sprite
	{
		public function ContentHover()
		{
			with(graphics)
			{
				beginFill(0x666666);
				drawRect(0, 0, 300, 120);
				endFill();
			}
			
			x = y = 125;
		}
		
		public function startHover():void
		{
			TweenLite.to(this, 3, {delay: 0.5, y: 140, ease:Sine.easeInOut, onComplete: hoverUp});
		}
		
		
		private function hoverUp():void
		{
			TweenLite.to(this, 3, {delay: 0.5, y: 110, ease:Sine.easeInOut, onComplete: startHover});
		}
	}
}

Initial URL


Initial Description


Initial Title
HNK_Animation_Hover

Initial Tags


Initial Language
Other