AS3对象值NativeText [英] as3 object values NativeText
本文介绍了AS3对象值NativeText的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
更新 - 如果任何人试图返回文本值与NativeText一个StageText的包装。他们将需要编辑;
updated - if anyone is trying to return text values with NativeText a StageText wrapper. they will need to edit;
https://github.com/cantrell/StageTextExample/blob/主/ src目录/ NativeText.as
添加一个公共的get函数 -
add a public get function -
public function get text():String {
return this.st.text;
}
然后就可以正常返回NativeText值 -
then you can return the NativeText values normally -
nt.text
推荐答案
添加一个getter在你上述工作对我的方式:)
Adding a getter in the way you described above worked for me :)
不过,我觉得我必须谨慎,因为也许有一个原因坎特雷尔没有把在getter方法。
However, I do feel like I have to be cautious because maybe there's a reason Cantrell didn't put the getter method in.
这篇关于AS3对象值NativeText的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文