Jump to content
Search Community

itty bitty tweeny button [SOLVED]

WhiteDesign test
Moderator Tag

Recommended Posts

Hello!!! Another question! Sorry about the subject title! Just couldn't resist!

 

I've created a simple button but I want to want to add a 'hit' area and I just can't fathom out how to do it.

My button is 100px x 100px but expands to 200 x 200 when the mouse rolls over.

I want the button to tween back to it's original size when the mouse moves away from the 100 x 100 area,

not wait until it leaves the roll over 200 x 200 area!

 

		mc.addEventListener(MouseEvent.ROLL_OVER, overThree);
		mc.addEventListener(MouseEvent.ROLL_OUT, outThree);
		TweenLite.to(mc, 0, {autoAlpha:0.5});

		function overThree(evt:MouseEvent):void {
			TweenLite.to(mc, 1, {setSize:{width:200, height:200}, autoAlpha:1});
			trace("button THREE works");
		}
		function outThree(evt:MouseEvent):void {
			TweenLite.to(mc, 1, {setSize:{width:100, height:100}, autoAlpha:0.5});
			trace("button THREE works");
		}

 

Thanks!!!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...