PDA

View Full Version : [AS3] Attach ScrollBar to MC with Dynamic XML Content


madcat
10-20-2009, 10:47 PM
...I'm strugglin' pretty hard on this one and I just have this feeling it shouldn't be so difficult.

All of my content boxes are created with code. So there's nothing "physical" to drag a UIScrollBar to.

When the XML is loaded, the MC's height changes depending on how much has been loaded. I assume this is where I want to add my scrollbar -- to that MC.

Problem is, it's not being loaded into one big text field. Does it need to be? Or can I use the UIScrollBar component to add a bar to movie clips as well?

Any help is appreciated.

CyanBlue
10-20-2009, 11:13 PM
Can you use TextArea component which will add the scrollbar as needed???

madcat
10-21-2009, 02:36 PM
Hmm, maybe so, thanks for the suggestion...

Can I add a background image to a textarea so that it stretches depending on how many XML entries? I suppose it would act like a MC in that respect?

Thanks --

CyanBlue
10-21-2009, 02:48 PM
I don't think you can do that... You probably need to make the textArea component transparent, and then lay a movieClip right below it where you load the image file and resize it depending on the size of the textArea component...