Problem creating dynamic text boxes that only display a scrollbar in needed

Hey all. I know there are are a couple posts regarding this, but they still didn’t answer my question, so I apologize up front for posting another. Bear with me. Thanks!

I have a number of different frames, let’s say 15 for example, that all have a dynamic text box with the instance name “caption” inside of a movie clip (caption_mc). Now, some of the text that will be dynamically loaded from a captions folder in these text boxes will only be a couple lines of text and some will be longer. Currently what I have is a scrollbar that always appears regardless of the length of the text. Having a scrollbar display when it isn’t needed looks unprofessional, not to mention confusing to the user.

So, my question is, how do I create one dynamic text box movie clip that will only display the scollbar if the dynamically loaded text calls for one?

Let me know if I can be any more clearer.

Here is the code I have in an actions layer for each frame that displays dynamic text:

loadText = new loadVars();
loadText.load(“captions/1.txt”); [color=red](subsequent frames have 2.txt, 3.txt, etc…)
[/color]loadText.onLoad = function()
{
title.text = this.title;
caption.text = this.caption;
};

Thanks everyone. I really appreciate all your help!