# Changing variable values in one class from another class

**URL:** <https://forum.kirupa.com/t/changing-variable-values-in-one-class-from-another-class/313709>\
**Category:** flash\
**Created:** [September 7, 2010, 11:44pm UTC](https://forum.kirupa.com/t/changing-variable-values-in-one-class-from-another-class/313709 "2010-09-07T23:44:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ccbass85](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@ccbass85](https://forum.kirupa.com/u/ccbass85)\
**Post date:** [September 7, 2010, 11:44pm UTC](https://forum.kirupa.com/t/changing-variable-values-in-one-class-from-another-class/313709/1 "2010-09-07T23:44:17Z")

</div>

I have two document classes. One is Main.as the other is Step2.as. I want to declare a public variable in Main.as then need to give it a value from Step2.as. That value will later be used in my next Document class Step3.as How would I write the code that gives the value in my Step2.as and then how would I write the code that retrieves the value in my Step3.as?

Note I can’t import my Step2/ or Step3 document class into my Main.as. Thanks in advance guys.
