# Flash and Javascript Variables?

**URL:** <https://forum.kirupa.com/t/flash-and-javascript-variables/134010>\
**Category:** Uncategorized\
**Created:** [January 13, 2005, 9:12pm UTC](https://forum.kirupa.com/t/flash-and-javascript-variables/134010 "2005-01-13T21:12:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haig\_Larsen](https://avatars.discourse-cdn.com/v4/letter/h/c67d28/32.png) [@Haig\_Larsen](https://forum.kirupa.com/u/Haig_Larsen)\
**Post date:** [January 13, 2005, 9:12pm UTC](https://forum.kirupa.com/t/flash-and-javascript-variables/134010/1 "2005-01-13T21:12:14Z")

</div>

I have a text file at a remote URL which is populated by a javascript statement.  
The text file looks like this:

document.write(’ 92.0 ');What I want is to take the 92 and populate a dynamic text box on thestage called winNumber with it. Here’s the code I’m using for that:myFile = new XML();  
myFile.onLoad = function() {  
var myNumber = myFile;  
\_root.winNumber.text = myNumber;

```
}

```

myFile.load(“[http://www.webaddresshere.com/tex](http://www.webaddresshere.com/tex.)t.txt”); This loads in the txt file just fine, but it loads in everything.Is there a way for me to lose the "document.write(’ 0 ');"and just send the “92” to the dynamic text box?Help is much appreciated. Thanks,Haig
