Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolling multiple text fields

Status
Not open for further replies.

bobbyr

Programmer
Nov 30, 2000
66
US
I'm using CS3 (ActionScript 2.0). I have a movie that is using external XML to create dynamic text fields. Everything is working great except now the page gets larger than the storyboard and it will not scroll. How should I go about getting the following code to scroll?

// blah blah blah cut out

ap_xml.onLoad = function(sucess) {
if (sucess) {
parseFile(ap_xml);
showArray();
}
};

var numOfColumns:Number = 2;
function showArray(){
for (i=0;i<ap.length;i++) {
pod_x = (i % numOfColumns) * (290 + 10);
if (pod_x == 0) pod_x = 15;
pod_y = Math.floor(i / numOfColumns) * (200 + 10);
if (pod_y == 0) pod_y = 15;
this.createTextField("backdrop"+i, i, pod_x, pod_y, 450, 160);
this["backdrop"+i].background = true;
this["backdrop"+i].backgroundColor = 0xFFCC00;
this["backdrop"+i].border = true;
this["backdrop"+i]._width = 270;
this["backdrop"+i].html = true;
this["backdrop"+i].wordWrap = true;
this["backdrop"+i].multiline = true;
this["backdrop"+i].styleSheet = styles;
txt_title = ap.filetitle;
txt_desc = ap.filedesc;
txt_button = ap.filebutton;
txt_url = ap.fileurl;
myText = "<p class='filetitle'>" + txt_title + "</p>";
myText += "<p class='filedesc'>" + txt_desc + "</p>" ;
myText += "<p class='filebutton'><a href='" + txt_url + "'><img src='button.gif'></a></p>" ;
this["backdrop"+i].htmlText = myText;

}
}

Thanks in advance! Bobby
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top