Hi,
I'm trying to learn out how to find how many characters are in a text field and then make an if statement out of it.
I looked up
TextField.textWidth and its says indicates the width of the text.
Well I'm not sure if that's what I want.
Basically I want to use it for finding out how many characters in my text field so that I can stop a scrolling text.
function resetPosition() {
if (trackInfo._width>=15) {
if (_root.firstload == true) {
trackInfo._x = 50;
_root.firstload = false;
}
} else {
trackInfo._x = 112-(trackInfo._width/2);
}
}
this.onEnterFrame = function() {
if (this.trackInfo._width>=15) {
if ((this.trackInfo._x+this.trackInfo._width)<0) {
this.trackInfo._x = 145;
} else {
this.trackInfo._x--;
}
}
};
- function resetPosition() {
- if (trackInfo._width>=15) {
- if (_root.firstload == true) {
- trackInfo._x = 50;
- _root.firstload = false;
- }
- } else {
- trackInfo._x = 112-(trackInfo._width/2);
- }
- }
- this.onEnterFrame = function() {
- if (this.trackInfo._width>=15) {
- if ((this.trackInfo._x+this.trackInfo._width)<0) {
- this.trackInfo._x = 145;
- } else {
- this.trackInfo._x--;
- }
- }
- };
What would be the right way of going about finding out how many characters in the textField?
Thanks