【发布时间】:2010-04-08 19:03:44
【问题描述】:
界面中只有三行文本的空间,但内容是外部和可变的,如果最终占用超过三行,则需要某种“查看全部”按钮功能。我可以考虑一下该功能需要是什么样的,但我不太确定在 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;
}
...对吗?您将如何填写缺失的部分?
【问题讨论】:
标签: flash actionscript-3 textfield utilities