# 2.0 Class: Can't get value of inputfield variable?

**URL:** <https://forum.kirupa.com/t/2-0-class-cant-get-value-of-inputfield-variable/213972>\
**Category:** Uncategorized\
**Created:** [January 24, 2007, 6:19pm UTC](https://forum.kirupa.com/t/2-0-class-cant-get-value-of-inputfield-variable/213972 "2007-01-24T18:19:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidOrtiz](https://avatars.discourse-cdn.com/v4/letter/d/e480ec/32.png) [@DavidOrtiz](https://forum.kirupa.com/u/DavidOrtiz)\
**Post date:** [January 24, 2007, 6:19pm UTC](https://forum.kirupa.com/t/2-0-class-cant-get-value-of-inputfield-variable/213972/1 "2007-01-24T18:19:36Z")

</div>

hi guys, i basically keep tracing the variable name and not the value of the variable.

class temp{  
private var myVariable:String;  
private var formClip:MovieClip;

public function temp(myClip:MovieClip){  
formClip = myClip;  
}

public function setVariable(myVar:String){  
myVariable = myVar;  
formClip.myTF.variable=myVariable;  
formBR[‘obj’] = this;  
formClip.onEnterFrame=function(){  
trace(this.obj.myVariable);  
}  
}  
}

this keeps giving me the name of the variable and not the contents of the variable. I’m trying to make it so when i type something in the textfield, i an trach myVariable and it’ll give me the contents. Any Ideas?
