problem with line spacing and carriage returns
I posted a previous question on the actionscript forum and got some assistance; however the solution isn't working for me and I think its due to the Koolmoves software I'm using. The post is here:
http://board.flashkit.com/board/showthread.php?t=826703
I wanted to know how to get my dynamic text box to display with single line breaks instead of double. My text file (mFile) reads this way:
2nd Saturday at Twelve Lounge
1123 H Street/ NE Washington DC 20003
Battle of the hottest djays
But when displayed in my movie it reads this way:
2nd Saturday at Twelve Lounge
1123 H Street/ NE Washington DC 20003
Battle of the hottest djays
This is the code I currently have that results to the above:
Code:
var R;
//
res=new LoadVars();
res.load("mfile.txt");
res.onData=function(info){
if (info==undefined){
R="Loading failed";
}else{
R=info; }
txt1.text=R;
}
I was advised to change "R=info;" to :
Code:
R=info.split("\r\n").join("\n");
When trying to use that syntax it produced the following error:
"expecting a variable for the property target"
Does anyone know the proper syntax for this expression? Or why I am getting this error?