# Dynamic text question

**URL:** <https://forum.kirupa.com/t/dynamic-text-question/22807>\
**Category:** Uncategorized\
**Created:** [June 9, 2003, 3:45am UTC](https://forum.kirupa.com/t/dynamic-text-question/22807 "2003-06-09T03:45:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrunkenMajestic](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/drunkenmajestic/32/237_2.png) [@DrunkenMajestic](https://forum.kirupa.com/u/DrunkenMajestic)\
**Post date:** [June 9, 2003, 3:45am UTC](https://forum.kirupa.com/t/dynamic-text-question/22807/1 "2003-06-09T03:45:21Z")

</div>

hi everybody,  
i’m new at this flash stuff, but ive managed to figure out most things that i need for my first flash site. the only thing im having trouble with is dynamic text. basically i want text example “intro” or “profiles” to appear in a dynamic text box when the mouse is rolled over a particular button. i have tried to adapt tutorials on this site such as the hover caption tutorial, but nothing seems to work. i know for most of you this is a pretty basic problem, but any help would be greatly appreciated. thanks guys.  
ps. ive attatched a basic file of what i think should work, but doesn’t.

---

<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:** [June 9, 2003, 3:51am UTC](https://forum.kirupa.com/t/dynamic-text-question/22807/2 "2003-06-09T03:51:44Z")

</div>

Your code:  
[AS]  
on (rollOver) {  
this.textbox = “press”;  
}  
on (rollOut) {  
this.textbox = “release”;  
}  
[/AS]  
The Fix:

```auto

on (rollOver) {
	_root.textbox.text = "press";
}
on (rollOut) {
	_root.textbox.text = "release";
}

```

The fix works for me, you try it. It should 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:** [June 9, 2003, 3:55am UTC](https://forum.kirupa.com/t/dynamic-text-question/22807/3 "2003-06-09T03:55:21Z")

</div>

hey thanks mate, as i said im new to this and havent quite figured the syntax out of AS. your solution makes perfect sense though, thanks again!!!  
p.s. i like your little moon/tide simulation thing, its pretty cool.

---

<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:** [June 9, 2003, 4:56am UTC](https://forum.kirupa.com/t/dynamic-text-question/22807/4 "2003-06-09T04:56:20Z")

</div>

You are welcome. I too am a beginner. Just started with Flash some two days ago.:pope:

---

<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:** [June 9, 2003, 7:57am UTC](https://forum.kirupa.com/t/dynamic-text-question/22807/5 "2003-06-09T07:57:55Z")

</div>

A piece of advice. Your text value did not display because you are using the instance name of you dynamic textfield. Your first code is not wrong, you just forgot to put the “var” name of the dynamic textfield under its properties. And watch out, do not bew confused with the “var” name and “instance” name of the dynanimc textfield. This is the new feature of Flash MX. Dynamic texts in Flash 5 don’t have that. 🙂

Cheers!
