Welcome, Guest
  • Author Topic: using the "/" as a string  (Read 4308 times)

    Mastamind

    • Jr. Programmer
    • **
    • Posts: 79
      • View Profile
      • Email
    using the "/" as a string
    « on: 12/22/04, 14:45 »
    Hello all,
    I have a problem. Its probably a dumb question but I still gotta ask. Im a newbee to Actionscripting so your help will be greatly appreciated.
    The problem I am having is that I want to attach text to a text field. In that text field I want to use the "/" as a slash not as math. Such as Apple/Orange/Lemon. When I type in the lline it reads as follows.
       this.b2.th1.text = "Apple / Orange / Lemon";
    Only when I test the movie I only see "Apple Orange Lemon", no slashes.  How could I add the "/" to the text line so that it shows when I test the movie. Is this even possible? Please help. Thank you.

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re:using the "/" as a string
    « Reply #1 on: 12/23/04, 10:06 »
    Hi Jorge,
    the slash is a escape character to code characters not available on the keyboard, or hard to insert.

    /n means new line, /t means tab etc.

    If you need a slash inside of your string, you have to code it twice: // delivers you one slash in youre string.

    You will find this in the most languages, at least at internet scripting ;)

    BTW: there is no such thing like dumb questions

    If you are friendly asking, you will get an answer. Everybody has started sometimes :)
    happy flashing
    8)
    Ronald