PDA

View Full Version : [AS2] Resizing Scrollbar component with dynamic content


fangonk
03-14-2009, 12:40 PM
Ok, so I am loading xml text in to a dynamic text field with a scrollbar component attached. I have a series of buttons, and everytime one of the buttons is pushed, a different xml file is loaded in to the dynamic text field. The problem is that the scrollbar component attached to dynamic text field doesn't resize or adjust so that some of the text gets clipped off.

Inside the movie with the dynamic text field/scrollbar, I have a script that looks like this:


tuteInfo_xml = new XML();
tuteInfo_xml.ignoreWhite = true;
tuteInfo_xml.onLoad = function(success) {
if (success) {
contentz = this.toString();
}
};



Here is the script I am using for the buttons:


instructorBTN.onRelease = function() {
aboutTxt.tuteInfo_xml.load('instructor.xml');

}

masterBtn.onRelease = function() {
aboutTxt.tuteInfo_xml.load('master.xml');

}

positionsBtn.onRelease = function() {
aboutTxt.tuteInfo_xml.load('positions.xml');
}

studioBTN.onRelease = function() {
aboutTxt.tuteInfo_xml.load('studio.xml');
}



How do I get the scrollbar component to resize or reset itself everytime I load new content in to the dynamic text field? Help!

atomic
03-14-2009, 02:15 PM
Attach your .fla and 2 .xml files to this forum...

__________________
Regards.

"But my words like silent raindrops fell, and echoed in the wells of silence..."

Click HERE (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3723050) to donate.

fangonk
03-16-2009, 08:57 AM
Hopefully this helps!