Flash Q

Out of context: Reply #3

  • Started
  • Last post
  • 6 Responses
  • ifeltdave0

    you could note the number of characters that fit in a text field, and that is your base number, call it X.

    then, you can access parts of the string you want to break up, almost like an array. For example,

    var mystring:String = "this is a string";
    var mypartialstring:String = mystring.slice(0,X);

    0 being the character number you start at, and X being the last character to pull from your string. Then simply populate a text field with that value.

    if you have many text fields and a long string, you could set up a for loop to go through your string.

    You can also access the number of characters in the string:

    var total:Number = mystring.length;

    Hope this helps.

View thread