# \[FMX\] calling the same function twice

**URL:** <https://forum.kirupa.com/t/fmx-calling-the-same-function-twice/37567>\
**Category:** flash\
**Created:** [December 11, 2003, 7:32pm UTC](https://forum.kirupa.com/t/fmx-calling-the-same-function-twice/37567 "2003-12-11T19:32:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adambiz](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@Adambiz](https://forum.kirupa.com/u/Adambiz)\
**Post date:** [December 11, 2003, 7:32pm UTC](https://forum.kirupa.com/t/fmx-calling-the-same-function-twice/37567/1 "2003-12-11T19:32:58Z")

</div>

the _who.say_ in the following function refers to a var displayed inside a dynamic text box.

when I tryed to call the function twice, from the same MC, only with different Who’s and What’s, it didn’t work. only one call displayed the text. any idea why?

//_who is talking, what is he saying, and for how long his text is displayed_\*  
function saythat(who, what, fortime) {  
starttime = getTimer();  
this.onEnterFrame = function() {  
if (getTimer() - starttime \< fortime) {  
who.say = what;  
}  
else {  
who.say = “”;  
delete this.onEnterFrame;  
}  
};  
}

huge thanks!
