4 Replies Latest reply on Apr 11, 2010 9:16 AM by kglad

    Adding line breaks in an as3 variable string?

    celebritymusic Level 1

      Hey guys

       

      I have two globals vars...

       

      globals.data.var1 = "test1";

      globals.data.var2 = "test2";

       

      I then add these to...

       

      globals.data.everything = globals.data.var1 + globals.data.var1;

       

      which when traced...

       

      trace(globals.data.everything);

       

      outputs...

       

      test1test2

       

      I'd like it to output

       

      test1

      test2

       

      How do I do that? What do I need to put in the code: globals.data.everything = globals.data.var1 + globals.data.var1;

       

      I figured out how to add a space:

       

      globals.data.everything = globals.data.var1 + " " + globals.data.var1;

       

      outputs...

       

      test1 test2

       

      But I can't figure how to add a line break.

       

      Thanks for your help on this one.

       

      Shaun