all groups > flash (macromedia) > november 2003 >
You're in the

flash (macromedia)

group:

Escape sequence in string


Escape sequence in string pwiop
11/24/2003 11:04:52 PM
flash (macromedia): I have created an array called headerArray which is populated by the addition of numerous '2 element' objects using the 'push' method (as explained to me by one of you guys) ie

headerInfo - new Object();
headerInfo.name = "the price of tea in China";
headerInfo.myPosition=1;
headerArray.push(headerInfo);

headerInfo - new Object();
headerInfo.name = "is the world round?";
headerInfo.myPosition=2;
headerArray.push(headerInfo);

etc etc etc

I have a dynamic text field on the stage, the variable name of which is called myHeaders

What I wish to do is to populate this text field with infomation taken from the headerArrat

What I want is for each chunk of the array to be separated by a 'carriage return'

I am trying the following but it i not working for me, any suggestions??

_root.myHeaders=headerArray[0].name \r headerArray[1].name


Cheers in anticipation once again

paul

Re: Escape sequence in string pwiop
11/24/2003 11:36:48 PM
Hah, sorted it myself

What I failed to do was to enclose the '\r' in quotation marks thus

_root.myHeaders=headerArray[0].name +\r+ headerArray[1].name
does NOT work

whereas

_root.myHeaders=headerArray[0].name +"\r\r"+ headerArray[1].name

DOES

Ha



AddThis Social Bookmark Button