# Functions

**URL:** <https://forum.kirupa.com/t/functions/56309>\
**Category:** Uncategorized\
**Created:** [July 2, 2004, 3:42pm UTC](https://forum.kirupa.com/t/functions/56309 "2004-07-02T15:42:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abraxas](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@abraxas](https://forum.kirupa.com/u/abraxas)\
**Post date:** [July 2, 2004, 3:42pm UTC](https://forum.kirupa.com/t/functions/56309/1 "2004-07-02T15:42:35Z")

</div>

Hello!

I wonder if I can make a button that starts a movieclip AND writes in a text in a dynamatic textfield?  
I have this as on the button:

on(release) {  
tellTarget(“texteffect”) [color=deepskyblue]//this is the movieclip[/color]  
gotoAndPlay(1)  
textfield = “text1” [color=deepskyblue] //this is the dynamatic textfield[/color]  
}

When i press down the button, the movieclip only starts.  
And i have wrote in the textfield in the Var: of the dynamatic textfield.  
I wonder, have i done anything wrong or cant i do 2 functions on 1 button?

Thanks  
abraxas

---

<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:** [July 2, 2004, 5:49pm UTC](https://forum.kirupa.com/t/functions/56309/2 "2004-07-02T17:49:24Z")

</div>

The thing is, when pressing down button1 the text : text1 will be showed. But if i press down button2, that does so the text2 will be showed, but it shows text1

(  
Button1 shows : text1  
Button2 shows : text1  
Button2 should show text2 but it doesnt. I got the As on the buttons.  
)  
Button 1:  
on(release) {  
tellTarget(“texteffect”) //this is the movieclip  
gotoAndPlay(1);  
textfield.text = “text1”;  
textfield.backgroundColor = true;  
textfield.backgroundColor = 0x000000;  
}  
Button 2:  
on(release) {  
tellTarget(“texteffect”) //this is the movieclip  
gotoAndPlay(1);  
textfield.text = “text2”;  
textfield.backgroundColor = true;  
textfield.backgroundColor = 0x000000;  
}

Please help!!

---

<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:** [July 2, 2004, 6:03pm UTC](https://forum.kirupa.com/t/functions/56309/3 "2004-07-02T18:03:12Z")

</div>

Problem seemed to be having your instance name and variable name the same for your text box.

[http://digitalink-designs.com/Functions2.fla](http://digitalink-designs.com/Functions2.fla)

Adam

---

<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:** [July 2, 2004, 6:05pm UTC](https://forum.kirupa.com/t/functions/56309/4 "2004-07-02T18:05:30Z")

</div>

> [@Adam14](#):
>
> Problem seemed to be having your instance name and variable name the same for your text box.
> 
> [http://digitalink-designs.com/Functions2.fla](http://digitalink-designs.com/Functions2.fla)
> 
> Adam

Yup, had to step out for a sec, but yes that seemed to be the problem.

Also FYI, you don’t have to use telltarget anymore.

A simple  
[AS]  
texteffect.gotoAndPlay(1);  
[/AS]

will serve the same justice.
