This one might seem a little weird; it's Flash-based, but it
can be
conceptualized as director since it's not the code I'm
having a
problem with, but the concept.
I've got a page with three columns, where each column is a
class.
i've got a static array 'columns' that they all share and
where each
adds 'this' to it's position.
What I want to have happen is, after each column adds it's
textfield,
they each draw a box that is even but larger than the
largest
textfield; ie if box 1 and 3 have short text, but col 2 has
long
text, all three columns draw to match the text in col 2.
Here's sort of what I'm doing, which doesn't always work;
nColumns
and boxHeight are static variables that are seen by the
class
function drawBox(tHt:Number) {
boxHeight = getBoxTop(tHt);
for(var i in nColumns){nColumns[i].drawThisBox()};
}
function getBoxTop(tHt) {
var trueHt = (topOffset + tHt +(2*buffer));
trace(trueHt);
if(trueHt>fakeBox.bottom &&
fakeBox.bottom<864){
while(trueHt>fakeBox.bottom &&
fakeBox.bottom<864){
fakeBox.bottom +=30;
trace(fakeBox + " : bottom : " +
fakeBox.bottom);
//var tRect = new Rectangle(0, topOffset, myWidth,
boxHeight);
//trace("boxHeight: " + boxHeight + "
tRect bottom: " +
tRect.bottom);
if(fakeBox.bottom>742){
fakeBox.bottom = 742;
break;
}
}
_______________________________________________
dirGames-L mailing list - dirGames-L nuttybar.drama.uga.edu
http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames
-l
|