Jump to content
Search Community

fl.controls.Button icon tweening problem

HansMeisa test
Moderator Tag

Recommended Posts

Hi I use the fl.control.Button and i have skinned it completly new.

For example: I added an icon like this: this.setStyle('icon', MyIcon);

Now i want to tween this icon on muose_over and mouse_out.

 

I use this AS to move the icon some px to the right and back:

 

this.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);

this.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);

 

private function mouseOverHandler(event:MouseEvent):void

{

TweenLite.to(this.icon, 0.5, {x:_iconX + 8 , ease:Quad.easeOut});

 

}

 

private function mouseOutHandler(event:MouseEvent):void

{

TweenLite.to(this.icon, 0.5, {x:_iconX , ease:Quad.easeOut});

}

 

But there is a problem: The animation is o.k. but on mouse out:

The icon jumps 1 Millisecond back to his default position an then the animation starts.

Someone know how to fix it?

 

Sorry about my bad english :-)

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...