Dynamic Text Within a MovieClip

Hi there. I’m a newbie AS3 coder and I’ve encountered quite an annoying problem, so I figured I’d come to the pros. :smiley: I’m learning to code in the form of a game, so yeah.

What my current situation is is the following: I have the character’s health bar in a movie clip within a button, which is kind of the character stats module. For the health bar, I have some dynamic text which I’d like to display the number of health points the char has. However, the variable for the hp is located on a scripts layer on the stage, and I can’t figure out how to, using the script on the stage, to edit the dynamic text within the movieclip within the button.

Basically, here’s how it is. I have a button called charStatsModule. Within it is a movie clip called charHealthBarMC. Inside that, I have some dynamic text called charHealthText. In the scripts layer on the stage in which the button is located, I’ve set a variable called charHealth.

Anyway, what I’d like to know is, from the scripts layer on the stage, how would I be able to set charHealthtext to display charHealth? I’ve got a feeling it may have something to do with root, but I’m not sure.

Thanks in advance!