How many characters in my text Field - In my scrollingText

  • bmcc81
  • Newbie
  • Newbie
  • User avatar
  • Posts: 9

Post 3+ Months Ago

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.

Code: [ Select ]
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--;
        }
    }
};
  1. function resetPosition() {
  2.     if (trackInfo._width>=15) {
  3.         if (_root.firstload == true) {
  4.             trackInfo._x = 50;
  5.             _root.firstload = false;
  6.         }
  7.     } else {
  8.         trackInfo._x = 112-(trackInfo._width/2);
  9.     }
  10. }
  11. this.onEnterFrame = function() {
  12.     if (this.trackInfo._width>=15) {
  13.         if ((this.trackInfo._x+this.trackInfo._width)<0) {
  14.             this.trackInfo._x = 145;
  15.         } else {
  16.             this.trackInfo._x--;
  17.         }
  18.     }
  19. };


What would be the right way of going about finding out how many characters in the textField?
Thanks
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • bmcc81
  • Newbie
  • Newbie
  • User avatar
  • Posts: 9

Post 3+ Months Ago

or simply...

How do I find out or read, how many character in my text field?

Which is brought in byXML?

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 10 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.