editManager.splitParagraph(); inherits previous paragraph format
So here is a function that I'm using in a screenwriting application that is suppose to drop down a line, center it and cause the next line to be all caps. However, the new paragraph inherits the previous paragraph's format. Am I doing this right? Is there a better way? How can I cause a new paragraph to be inserted here with the new format?
public function character():void {
var cf:TextLayoutFormat = new TextLayoutFormat();
editManager.splitParagraph();
cf.paragraphSpaceBefore="10";
cf.textAlign = "center";
cf.typographicCase="uppercase";
IEditManager(textFlow.interactionManager).applyParagraphFormat(cf);
textFlow.interactionManager.setFocus();
}
thanks,
