# Random generate in dynamic text field

**URL:** <https://forum.kirupa.com/t/random-generate-in-dynamic-text-field/190708>\
**Category:** flash\
**Created:** [June 14, 2006, 2:37am UTC](https://forum.kirupa.com/t/random-generate-in-dynamic-text-field/190708 "2006-06-14T02:37:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![puthem1st](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@puthem1st](https://forum.kirupa.com/u/puthem1st)\
**Post date:** [June 14, 2006, 2:37am UTC](https://forum.kirupa.com/t/random-generate-in-dynamic-text-field/190708/1 "2006-06-14T02:37:07Z")

</div>

Hello! Does anyone know how to randomly generate something to display in a dynamic text field. So far I have named the dynamic text field and in the actionscript I have called it, nothing comes up. I have search several places and still have not been able to solve the problem. However before I called the text box I tested my code with the trace function and It display in the output box but not the dynamic text box. Please help.

Example  
generateRandom = function() { /\* Code I used to call the txt box does not wk.  
display.text = Math.ceil(Math.random()\*200);  
}  
function ranEquation(){  
…

or  
function ranEquation(){… /\* this was used first to randomly generate and works with the trace function

Thanks
