How do I send a newline character to GFxMovie?

I can’t seem to ask this question. Is the forum broken? Does it not like the characters I’m entering? Does it think I’m trying to do some kind of code insertion? Will it let me ask my question if I put it here as a picture?

Huh. It worked that time. TIL either you cannot put forward slashes in your title, or you cannot put too many regexes into your question. Let me see if I can copy/paste the text back in here. If this works, then I guess you just can’t put forward slashes in the title.

I have some text that I set in the Unreal Editor. I want that text to contain newline characters, or
, that will show up in the GFxMovie as a new line. When I set some test text inside Flash Pro, the newlines print correctly. But when I put "
" in my text in Unreal Editor, the GFxMovie actually displays the text "
" as though I had written it with an escape like

I figured this was because either Unreal or Flash was sanitizing the string input. I figured the easiest way to try getting around this specific problem would be by writing an ActionScript function to replace all
instances with
. But I think something is broken with how the Scaleform plugin handles regular expressions.

I try just the simple example from the ActionScript website…

		var str:String = "She sells seashells by the seashore."; 
		var pattern:RegExp = /sh/gi; 
		trace(str.replace(pattern, "sch")); 
			//sche sells seaschells by the seaschore.

…and I get this error:

		Error: Error: Error #1001

Has anyone ever tried using regular expressions in ActionScript while also the Scaleform plugin? How did you get it to work?

function formatNewLines(inString:String):String
	var index:int = inString.indexOf("\
	while(index != -1)
		inString = inString.slice(0, index) + "
" + inString.slice(index + 2, inString.length);
		index = inString.indexOf("\
	return inString;

Well, that seems kind of ugly and unnecessary, but I just send my text through that function, and it puts proper newline characters where they’re supposed to be.

I made the same as above, but I used html characters. so I pass newlines as <br>
not ideal to do such string operations but my game is light on the GUI so for me it’s fine