質問

what's better for memory and process? 1- one dynamic text and update it each second with:

this.t1.text = "Time: " + String(tin);

2- or have one static text and one dynamic text that updates with:

this.t1.text = String(tin);
役に立ちましたか?

解決

Memory usage is more important than file size. Don't worry about increasing file size for increasing performance. That's right decision. I mean, the second one is better. Yeah, needs a little more work but it's good.

And an important point for that. If you're not using any imported text renderer class, you don't need to use something like that for a text have a few characters like "Time: ", but if you're using long texts, it's better use another text object for dynamic parts of text file even you're using anyother renderer or you're using flash's text input stuff.

I mean, "text's font size" may be important for rendering text elements because of pixel count.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top