# \[FMX\] calling the same function twice

**URL:** <https://forum.kirupa.com/t/fmx-calling-the-same-function-twice/96631>\
**Category:** Uncategorized\
**Created:** [December 11, 2003, 7:32pm UTC](https://forum.kirupa.com/t/fmx-calling-the-same-function-twice/96631 "2003-12-11T19:32:58Z")\
**Posts on this page:** 2\
**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/96631/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!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 12, 2003, 9:02am UTC](https://forum.kirupa.com/t/fmx-calling-the-same-function-twice/96631/2 "2003-12-12T09:02:14Z")

</div>

Here. a Light version. It’s supposed to be a quest like convesetion. you pick a sentece, (only one option, for now), which should be displayed as if the green box said it. the white box should reply to your sentence.

right now, the white box replys, but the green box refuses to write down what it supposed to.

again, big thanks.  
adam.
