# Change Variables With Textbox

**URL:** <https://forum.kirupa.com/t/change-variables-with-textbox/170060>\
**Category:** flash\
**Created:** [November 22, 2005, 1:49pm UTC](https://forum.kirupa.com/t/change-variables-with-textbox/170060 "2005-11-22T13:49:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roob](https://avatars.discourse-cdn.com/v4/letter/r/b782af/32.png) [@roob](https://forum.kirupa.com/u/roob)\
**Post date:** [November 22, 2005, 1:49pm UTC](https://forum.kirupa.com/t/change-variables-with-textbox/170060/1 "2005-11-22T13:49:55Z")

</div>

Right, is it possible to change the varaible of an object within flash (5) through the use of a textbox? The reason being we’re doing a group project with Flash and MaxMSP and when a video camera picks up movement, numbers will be sent from MaxMSP through to flash.

Thus, when these numbers “arrive” in flash I want them to trigger certain events. For instance (where this code resides in the movie clip: ‘tree’):

```auto
onClipEvent(load){
if(textbox=5){
   gotoAndPlay("grow");
}
}

```

Here, the idea is that when ‘5’ is sent to flash a tree will grow and when 4 is sent something else will grow etc… However, because I don’t want stuff growing all the time I need to change the variable of an object. I presume a textbox would be the easiest way of going about it, but I have no idea how to do it! Has anyone got any suggestions?
