インターフェイスには 3 行のテキストしかありませんが、コンテンツは外部的で可変的であり、最終的に 3 行を超える場合は、ある種の「すべて表示」ボタン機能が必要です。その機能がどのように見える必要があるかについてはある程度考えることができますが、AS3 でそれを行う最善の方法が何であるかはよくわかりません。次のようなもの (疑似コード):
function cropText(source:TextField, length:int, append:String):TextField{
if(source.lineCount > length){
source.text = // magic function that retuns the first length lines,
// minus append.length characters, with the append value tacked onto the end
}
return source;
}
... 右?欠けているビットをどのように埋めますか?