# I feel like such a newb

**URL:** <https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467>\
**Category:** flash\
**Created:** [August 2, 2003, 8:30pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467 "2003-08-02T20:30:58Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mik3](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Mik3](https://forum.kirupa.com/u/Mik3)\
**Post date:** [August 2, 2003, 8:30pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/1 "2003-08-02T20:30:58Z")

</div>

HOw can I add text to a dynamic text field on release when a button is pressed?

---

<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:** [August 2, 2003, 8:32pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/2 "2003-08-02T20:32:45Z")

</div>

> \*Originally posted by :mike: \*  
> \*\*on release when a button is pressed? \*\*  
> lol, do you want it on release or on press? anywho, try this:

```auto
mybuttonsinstancename.onRelease = function() {
mytextfield.text += "text to be added"
}

// OR

mybuttonsinstancename.onPress = function() {
mytextfield.text += "text to be added"
}

```

---

<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:** [August 2, 2003, 9:34pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/3 "2003-08-02T21:34:11Z")

</div>

😃 THANKS AHMED

---

<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:** [August 2, 2003, 9:47pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/4 "2003-08-02T21:47:07Z")

</div>

another problem.  
Is it possible to get it to change the text in a dynamic text field in another movie clip other than the button? If not, its ok

also, I expirimented a bit and couldn’t figure out this… I want it so after I release the button that adds new text it puts the other text in an new line

like say I use this code:

```php

button.onRelease = function() {
	text_field.text += "textHere";
}

```

and when I prewss the button 3 times it does this:  
textHeretextHeretextHere

but I want it to do this when I press it 3 times:  
textHere  
textHere  
textHere

---

<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:** [August 2, 2003, 9:55pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/5 "2003-08-02T21:55:41Z")

</div>

```auto
button.onRelease = function() {
    _root.text_field.text += "textHere";
}

```

---

<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:** [August 2, 2003, 10:09pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/6 "2003-08-02T22:09:24Z")

</div>

I tried your code Yeldarb and nothing happens at all now, ill work with it, i musta done something wrong

---

<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:** [August 2, 2003, 10:20pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/7 "2003-08-02T22:20:40Z")

</div>

instead of typing root.text\_field try using the crosshair thing in the actionscript pane and at the bottom set it to dot and global

---

<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:** [August 2, 2003, 10:53pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/8 "2003-08-02T22:53:47Z")

</div>

> \*Originally posted by :mike: \*  
> \*\*another problem.  
> Is it possible to get it to change the text in a dynamic text field in another movie clip other than the button? If not, its ok

also, I expirimented a bit and couldn’t figure out this… I want it so after I release the button that adds new text it puts the other text in an new line

like say I use this code:

```php

button.onRelease = function() {
	text_field.text += "textHere";
}

```

and when I prewss the button 3 times it does this:  
textHeretextHeretextHere

but I want it to do this when I press it 3 times:  
textHere  
textHere  
textHere \*\*  
then do this

```auto
button.onRelease = function() {
    text_field.text = "textHere";
}

```

---

<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:** [August 2, 2003, 10:54pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/9 "2003-08-02T22:54:19Z")

</div>

didn’t work ☹

---

<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:** [August 2, 2003, 10:55pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/10 "2003-08-02T22:55:04Z")

</div>

oh, didn’t see your post ahmed, one second ill try

---

<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:** [August 2, 2003, 10:58pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/11 "2003-08-02T22:58:12Z")

</div>

yeh, i tried that, but it doesn’t put it on a new line, but this will do, thanks guys for your 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:** [August 2, 2003, 10:59pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/12 "2003-08-02T22:59:49Z")

</div>

> \*Originally posted by :mike: \*  
> \*\*another problem.  
> Is it possible to get it to change the text in a dynamic text field in another movie clip other than the button?  
> \*\*

?

---

<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:** [August 2, 2003, 11:25pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/13 "2003-08-02T23:25:28Z")

</div>

mike, regarding displaying the text on a new line each time the button is pressed, do the following:

1. HTML enable the textbox (you can use AS to do this or you can just select the textbox and set it from the properties panel).
2. Use this piece of AS instead of the current piece that you have been trying to use:

```auto
button.onRelease = function() {
        text_field.text = "textHere< br >";
}

```

note: You need to remove the spaces between the br and the \< and \> in order for it to work.

If the textbox reads it as HTML, then it will process the line break tag and place it on a new line each time due to the previous HTML (or it should do :)).

Hope this helps,  
JK.

---

<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:** [August 2, 2003, 11:28pm UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/14 "2003-08-02T23:28:23Z")

</div>

To html enable a textbox via AS, this should work:

```auto
instancenameoftextboxhere.html = true ;

```

---

<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:** [August 3, 2003, 12:20am UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/15 "2003-08-03T00:20:59Z")

</div>

[AS]text\_field.text = "  
textHere";  
//  
text\_field.text = “\rtextHere”;[/AS]

---

<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:** [August 3, 2003, 12:29am UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/16 "2003-08-03T00:29:30Z")

</div>

oh yeh! that would work! THANKS GUYS!!!

---

<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:** [August 3, 2003, 12:30am UTC](https://forum.kirupa.com/t/i-feel-like-such-a-newb/27467/17 "2003-08-03T00:30:07Z")

</div>

No problem. 😉

By the way, I forgot to post this link… 😛  
[http://www.kirupaforum.com/forums/showthread.php?s=&postid=122824#post122824](http://www.kirupaforum.com/forums/showthread.php?s=&postid=122824#post122824)
