Jump to content
Search Community

[Question] Events and parameters passed to the Handling function

kafka test
Moderator Tag

Recommended Posts

Dear People,

I love using your library, It's simple and very effective.

I have a simple question, I've look in the documentation but can't find an answer.

How can I recieve the TweenMaxEvent inside my event handlers ?

example:

TweenMax.to(iSprite, iRandTime , { y:_topYSpot, onComplete:onEffectComplete  } );
private function onEffectComplete(e:Event = null):void
{
trace (e);
}

onComplete always comes to the function with no event, is there any way to recieve the event and know the target/currentTarget as usual AS3 code.

Thanks In Advance and have a great day.

K

Link to comment
Share on other sites

Hi,

The following code seems to send the event parameter into the handler function, Trial and error works sometimes.

var tempTween:TweenMax = TweenMax.to(iSprite, iRandTime , { y:_topYSpot  } );
   tempTween.addEventListener(Event.COMPLETE, onEffectComplete);
private function onEffectComplete(e:Event = null):void
{
 trace (e);
}

Thanks for all your help.

K

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