# Javascript + Flash...how do I get my variable?

**URL:** <https://forum.kirupa.com/t/javascript-flash-how-do-i-get-my-variable/52156>\
**Category:** flash\
**Created:** [May 20, 2004, 4:13pm UTC](https://forum.kirupa.com/t/javascript-flash-how-do-i-get-my-variable/52156 "2004-05-20T16:13:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrand01](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@mrand01](https://forum.kirupa.com/u/mrand01)\
**Post date:** [May 20, 2004, 4:13pm UTC](https://forum.kirupa.com/t/javascript-flash-how-do-i-get-my-variable/52156/1 "2004-05-20T16:13:48Z")

</div>

I am using _flashobject_.SetVariable() in my javascript to set a variable in a flash document. If I set the “var” (eww) field of one of my textboxes to the variable name, everything works fine, the variable is received and is displayed in the textbox. If I try this code (instead of using the “var” box), nothing happens…how can I get my variable without using that “var” field?

```auto

var strStatus:String = "0";

_root.onEnterFrame = function() {
  if (strStatus != "0") {
    txtStatus.text = strStatus;
  }
}

```
