Call a function when enter function?

hy everyone,

how can i can call a function only when i enter 1 determineted function?

addEventListener(???, tweenfunction);

hope u guys can help me,