hey
i'm getting a list of events from the database (no prblem there), and i want to print it the following way:
here's my code:
i populate newTextA and when that's ready i put it inside sTextA which is a dynamic text field.
everything works great but i don't want to use tabs because when a title is longer then the others the text isn't aligned correctly (like if i used a table in HTML for each column).
to make it clearer,if i could use html tables in flash the above code would've looked more or less like this:
this way i know the spacing will always be the same between the columns and i can allow for line breaks in the description.
so,the big question,how can i do this in flash?
thanks (-:
i'm getting a list of events from the database (no prblem there), and i want to print it the following way:
Code:
Title Description Date Flyer
here's my code:
Code:
sTextA = "loading...";
newTextA = "";
for (i = 0; i < numEvents; i++) {
newTextA += this["eventTitle"+i] + "\t";
newTextA += this["eventDesc"+i] + "\t";
newTextA += this["eventDate"+i] + "\t";
if (this["eventFlyer"+i] != "") {
//if event has a flyer,print a link to it
newTextA += "<a href=\""+ imagesDir +"/"+ this["eventFlyer"+i] +"\">flyer</a>";
}
newTextA += "<br>";
}
sTextA = newTextA;
everything works great but i don't want to use tabs because when a title is longer then the others the text isn't aligned correctly (like if i used a table in HTML for each column).
to make it clearer,if i could use html tables in flash the above code would've looked more or less like this:
Code:
newTextA = "<table border=0 cellspacing=2 cellpadding=2>";
for (i = 0; i < numEvents; i++) {
newTextA += "<tr>";
newTextA += "<td>"+ this["eventTitle"+i] + "</td>";
newTextA += "<td>"+ this["eventDesc"+i] + "</td>";
newTextA += "<td>"+ this["eventDate"+i] + "</td>";
newTextA += "<td>";
if (this["eventFlyer"+i] != "") {
//if event has a flyer,print a link to it
newTextA += "<a href=\""+ imagesDir +"/"+ this["eventFlyer"+i] +"\">flyer</a>";
} else {
//no flyer
newTextA += " ";
}
newTextA += "</td></tr>";
}
newTextA += "</table>";
so,the big question,how can i do this in flash?
thanks (-: