Change Variables With Textbox

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’):

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?