| 패키지 | flashx.textLayout.elements | 
| 클래스 | public final class ParagraphElement | 
| 상속 | ParagraphElement    ParagraphFormattedElement   FlowGroupElement   FlowElement   Object | 
| 언어 버전: | ActionScript 3.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
기본 MXML 속성mxmlChildren
기타 예제
관련 API 요소
공용 속성
공용 메서드 
| 메서드 | 정의 주체 | ||
|---|---|---|---|
 생성자 - 텍스트 흐름의 단락을 나타냅니다.  | ParagraphElement | ||
![]()  |  
		 자식 FlowElement 객체를 추가합니다.  | FlowGroupElement | |
![]()  |  
		 지정된 인덱스 위치의 자식 FlowElement 객체를 추가합니다.  | FlowGroupElement | |
![]()  |  이 FlowElement 객체의 styleProp 매개 변수로 지정된 스타일을 지웁니다.  | FlowElement | |
![]()  | 
		 두 개의 지정된 문자 위치 간의 내용을 복사하고, 복사본을 FlowElement 객체로 반환하여 이 FlowElement 객체의 전체 복사본(모든 자식 포함)을 만듭니다.  | FlowElement | |
![]()  |  이 클래스의 userStyles를 otherElement의 userStyles와 비교합니다.  | FlowElement | |
![]()  | 
		 상대적 텍스트 위치가 지정되면 해당 상대적 위치를 포함하는 자식 FlowElement의 인덱스를 찾습니다.  | FlowGroupElement | |
![]()  | 
		 상대적 텍스트 위치가 지정되면 해당 상대적 위치를 포함하는 리프 요소를 찾습니다.  | FlowGroupElement | |
 
		 지정된 위치에서 정방향으로 검색하여 텍스트 내 다음 아톰 위치를 찾고 인덱스를 반환합니다.  | ParagraphElement | ||
 
		 텍스트에서 다음 단어 경계의 인덱스를 반환합니다.  | ParagraphElement | ||
 
		 지정된 위치에서 역방향으로 검색하여 텍스트 내 이전 아톰 위치를 찾고 인덱스를 반환합니다.  | ParagraphElement | ||
 
		 텍스트에서 이전 단어 경계의 인덱스를 반환합니다.  | ParagraphElement | ||
![]()  | 
		 텍스트 흐름에서 요소의 시작 위치를 절대 인덱스로 반환합니다.  | FlowElement | |
![]()  |  
		FlowElement 객체에 상대적인, 지정된 위치의 문자를 반환합니다.  | FlowElement | |
![]()  |  FlowElement에 상대적인, 지정된 위치의 문자 코드를 반환합니다.  | FlowElement | |
![]()  |  
		 지정된 인덱스의 FlowElement 자식을 반환합니다.  | FlowGroupElement | |
![]()  |  
		 지정된 FlowElement 객체의 자식을 검색하고 해당 인덱스 위치를 반환합니다.  | FlowGroupElement | |
![]()  | 
		 상위 항목 요소에 상대적인 이 요소의 시작을 반환합니다.  | FlowElement | |
![]()  | 
		 이 그룹의 첫 번째 FlowLeafElement 하위 항목을 반환합니다.  | FlowGroupElement | |
![]()  | 
		 이 그룹의 마지막 FlowLeafElement 하위 항목을 반환합니다.  | FlowGroupElement | |
 더 이상 단락이 없는 경우 뒤에 오는 단락이나 null을 반환합니다.  | ParagraphElement | ||
![]()  |  텍스트 흐름 계층 구조에서 다음 FlowElement 형제를 반환합니다.  | FlowElement | |
![]()  | 
		 이 요소와 연관된 ParagraphElement 객체를 반환합니다.  | FlowElement | |
 TextFlow에서 첫 번째 단락인 경우 이 단락 뒤에 오는 단락이나 null을 반환합니다.  | ParagraphElement | ||
![]()  |  텍스트 흐름 계층 구조에서 이전 FlowElement 형제를 반환합니다.  | FlowElement | |
![]()  |  styleProp 매개 변수로 지정된 스타일의 값을 반환합니다. 이 매개 변수는 스타일 이름을 지정하며 임의의 사용자 스타일 이름을 포함할 수 있습니다.  | FlowElement | |
![]()  | [재정의]   | FlowGroupElement | |
![]()  | 
		 텍스트 흐름 계층 구조를 올라가 요소의 루트 TextFlow 객체를 반환합니다.  | FlowElement | |
![]()  | 
	 지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다.  | Object | |
![]()  |  구현하는 객체가 만들어지고 MXML 태그에 지정된 모든 구성 요소 속성이 초기화된 후 MXML 객체에 대해 호출됩니다.  | FlowElement | |
![]()  | 
	 Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다.  | Object | |
![]()  | 
	 지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다.  | Object | |
![]()  |  
		 그룹에서 지정된 자식 FlowElement 객체를 제거합니다.  | FlowGroupElement | |
![]()  |  
		 지정된 인덱스 위치의 자식 FlowElement 객체를 제거합니다.  | FlowGroupElement | |
![]()  | 
		 그룹의 자식 요소를 지정된 새 요소로 바꿉니다.  | FlowGroupElement | |
![]()  | 
     루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다.  | Object | |
![]()  |  styleProp 매개 변수로 지정된 스타일을 newValue 매개 변수로 지정된 값으로 설정합니다.  | FlowElement | |
![]()  | 
		 지정된 두 문자 위치 간의 내용을 복사하여 이 FlowElement 객체의 복사본을 만듭니다.  | FlowElement | |
![]()  |  
		 childIndex 매개 변수로 지정된 위치에 있는 이 객체를 분리합니다.  | FlowGroupElement | |
![]()  |  
		 relativePosition 매개 변수로 지정된 위치에서 이 FlowElement 객체를 분리합니다. 지정된 위치는 이 요소의 텍스트에 있는 상대적 위치입니다.  | FlowElement | |
![]()  | 
	 로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다.  | Object | |
![]()  | 
	 지정된 객체의 문자열 표현을 반환합니다.  | Object | |
![]()  | 
	 지정된 객체의 프리미티브 값을 반환합니다.  | Object | |
생성자 세부 정보
ParagraphElement | () | 생성자 | 
public function ParagraphElement()| 언어 버전: | ActionScript 3.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
생성자 - 텍스트 흐름의 단락을 나타냅니다.
메서드 세부 정보
findNextAtomBoundary | () | 메서드 | 
 public function findNextAtomBoundary(relativePosition:int):int| 언어 버전: | ActionScript 3.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
지정된 위치에서 정방향으로 검색하여 텍스트 내 다음 아톰 위치를 찾고 인덱스를 반환합니다. 아톰이라는 용어는 텍스트 줄을 구성하는 개별 항목인 그래픽 요소와 문자를 모두 지칭합니다. 여기에는 문자를 결합하여 형성된 그룹도 포함됩니다.
매개 변수
relativePosition:int —  시작할 텍스트의 위치로서, 0부터 계수됩니다.
		  | 
int — 텍스트에서 다음 아톰의 인덱스를 반환합니다.
		 
		  | 
관련 API 요소
예제 ( 예제 사용 방법 )
 이 예에서는 단락의 지정된 오프셋에서 다음 아톰 경계를 찾습니다.
package flashx.textLayout.elements.examples
{
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    
    public class ParagraphElement_findNextAtomBoundary  extends Sprite
    {
        public function ParagraphElement_findNextAtomBoundary()
        {
            // create the TextFlow, ParagraphElement and SpanElement objects to hold paragraph
            var textFlow:TextFlow = new TextFlow();
            var paragraph:ParagraphElement = new ParagraphElement();    
            var span:SpanElement = new SpanElement();
            // assign text to the span; add span to paragraph and paragraph to TextFlow
            span.text = "Hello brave, new world!";
            paragraph.addChild(span);
            textFlow.addChild(paragraph);
            // assign a controller to the stage and update it to compose and display text
            textFlow.flowComposer.addController(new ContainerController(this, 200, 400));
            textFlow.flowComposer.updateAllControllers();
            // find the next atom boundaries from offsets 5 and 10
            var atomBoundary:int = paragraph.findNextAtomBoundary(4);                           
            trace(atomBoundary); // 5 
            atomBoundary = paragraph.findNextAtomBoundary(10);                           
            trace(atomBoundary); // 11  
        }
    }
}
findNextWordBoundary | () | 메서드 | 
 public function findNextWordBoundary(relativePosition:int):int| 언어 버전: | ActionScript 3.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
텍스트에서 다음 단어 경계의 인덱스를 반환합니다.
지정된 위치에서 정방향으로 검색하여 텍스트에서 단어를 시작하거나 끝내는 다음 위치를 찾습니다.
매개 변수
relativePosition:int —  시작할 텍스트의 위치로서, 0부터 계수됩니다.
		  | 
int — 텍스트에서 다음 단어 경계의 인덱스를 반환합니다.
		 
		  | 
예제 ( 예제 사용 방법 )
 이 예에서는 단락의 지정된 오프셋에서 다음 단어 경계를 찾습니다.
package flashx.textLayout.elements.examples
{
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    
    public class ParagraphElement_findNextWordBoundary  extends Sprite
    {
        public function ParagraphElement_findNextWordBoundary()
        {
            // create the TextFlow, ParagraphElement and SpanElement objects to hold paragraph
            var textFlow:TextFlow = new TextFlow();
            var paragraph:ParagraphElement = new ParagraphElement();    
            var span:SpanElement = new SpanElement();
            // assign text to the span; add span to paragraph and paragraph to TextFlow
            span.text = "Hello brave, new world!";
            paragraph.addChild(span);
            textFlow.addChild(paragraph);
            // assign a controller to the stage and update it to compose and display text
            textFlow.flowComposer.addController(new ContainerController(this, 200, 400));
            textFlow.flowComposer.updateAllControllers();
            // find the next word boundary from offsets 0 and 12
            var wordBoundary:int = paragraph.findNextWordBoundary(0);                           
            trace(wordBoundary); // 5 
            wordBoundary = paragraph.findNextWordBoundary(12);                           
            trace(wordBoundary); // 13        
        }
    }
}
findPreviousAtomBoundary | () | 메서드 | 
 public function findPreviousAtomBoundary(relativePosition:int):int| 언어 버전: | ActionScript 3.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
지정된 위치에서 역방향으로 검색하여 텍스트 내 이전 아톰 위치를 찾고 인덱스를 반환합니다. 아톰이라는 용어는 텍스트 줄을 구성하는 개별 항목인 그래픽 요소와 문자를 모두 지칭합니다. 여기에는 문자를 결합하여 형성된 그룹도 포함됩니다.
매개 변수
relativePosition:int —  시작할 텍스트의 위치로서, 0부터 계수됩니다.
		  | 
int — 텍스트에서 이전 클러스터의 인덱스를 반환합니다.
		 
		  | 
관련 API 요소
예제 ( 예제 사용 방법 )
 이 예에서는 단락의 지정된 오프셋에서 이전 아톰 경계를 찾습니다.
package flashx.textLayout.elements.examples
{
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    
    public class ParagraphElement_findPreviousAtomBoundary  extends Sprite
    {
        public function ParagraphElement_findPreviousAtomBoundary()
        {
            // create the TextFlow, ParagraphElement and SpanElement objects to hold paragraph
            var textFlow:TextFlow = new TextFlow();
            var paragraph:ParagraphElement = new ParagraphElement();    
            var span:SpanElement = new SpanElement();
            // assign text to the span; add span to paragraph and paragraph to TextFlow
            span.text = "Hello brave, new world!";
            paragraph.addChild(span);
            textFlow.addChild(paragraph);
            // assign a controller to the stage and update it to compose and display text
            textFlow.flowComposer.addController(new ContainerController(this, 200, 400));
            textFlow.flowComposer.updateAllControllers();
            // find the previous atom boundaries from offsets 6 and 13
            var atomBoundary:int = paragraph.findPreviousAtomBoundary(6);                           
            trace(atomBoundary); // 5 
            atomBoundary = paragraph.findPreviousAtomBoundary(13);                           
            trace(atomBoundary); // 12      
        }
    }
}
findPreviousWordBoundary | () | 메서드 | 
 public function findPreviousWordBoundary(relativePosition:int):int| 언어 버전: | ActionScript 3.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
텍스트에서 이전 단어 경계의 인덱스를 반환합니다.
지정된 위치에서 역방향으로 검색하여 텍스트에서 단어를 시작하거나 끝내는 이전 위치를 찾습니다.
매개 변수
relativePosition:int —  시작할 텍스트의 위치로서, 0부터 계수됩니다.
		  | 
int — 텍스트에서 이전 단어 경계의 인덱스를 반환합니다.
		 
		  | 
예제 ( 예제 사용 방법 )
 이 예에서는 단락의 지정된 오프셋에서 이전 단어 경계를 찾습니다.
package flashx.textLayout.elements.examples
{
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    
    public class ParagraphElement_findPreviousWordBoundary  extends Sprite
    {
        public function ParagraphElement_findPreviousWordBoundary()
        {
            // create the TextFlow, ParagraphElement and SpanElement objects to hold paragraph
            var textFlow:TextFlow = new TextFlow();
            var paragraph:ParagraphElement = new ParagraphElement();    
            var span:SpanElement = new SpanElement();
            // assign text to the span; add span to paragraph and paragraph to TextFlow
            span.text = "Hello brave, new world!";
            paragraph.addChild(span);
            textFlow.addChild(paragraph);
            // assign a controller to the stage and update it to compose and display text
            textFlow.flowComposer.addController(new ContainerController(this, 200, 400));
            textFlow.flowComposer.updateAllControllers();
            // find the previous word boundary from offsets 0 and 12
            var wordBoundary:int = paragraph.findPreviousWordBoundary(22);                           
            trace(wordBoundary); // 17 
            wordBoundary = paragraph.findPreviousWordBoundary(11);                           
            trace(wordBoundary); // 6  
        }
    }
}
getNextParagraph | () | 메서드 | 
 public function getNextParagraph():ParagraphElement| 언어 버전: | ActionScript 3.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
더 이상 단락이 없는 경우 뒤에 오는 단락이나 null을 반환합니다.
반환값ParagraphElement — 더 이상 단락이 없는 경우의 다음 단락 또는 null을 반환합니다.
		 
		  | 
관련 API 요소
예제 ( 예제 사용 방법 )
 이 예에서는 xml 마크업에서 세 개의 텍스트 단락을 가져오고, getChildAtIndex(0)를 사용하여 첫 번째 단락에 액세스하며, getNextParagraph()를 사용하여 두 번째 단락에 액세스합니다.
package flashx.textLayout.elements.examples
{
    import flash.display.Sprite;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    
    public class ParagraphElement_getNextParagraph  extends Sprite
    {
        public function ParagraphElement_getNextParagraph()
        {
            // create TextFlow object
            var textFlow:TextFlow = new TextFlow();        
            // create content for TextFlow using XML markup
            var simpleText:String = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<flow:TextFlow xmlns:flow=\"http://ns.adobe.com/textLayout/2008\">"+
                    "<flow:p>"+
                        "<flow:span>This is the first paragraph.</flow:span>"+    
                    "</flow:p>"+
                    "<flow:p>"+
                        "<flow:span>This is the second paragraph.</flow:span>"+    
                    "</flow:p>"+
                    "<flow:p>"+
                        "<flow:span>This is the third paragraph.</flow:span>"+ 
                    "</flow:p>"+
                "</flow:TextFlow>";
            // import the xml markup into a TextFlow object and display it on the stage
            textFlow = TextConverter.importToFlow(simpleText, TextConverter.TEXT_LAYOUT_FORMAT);
            textFlow.flowComposer.addController(new ContainerController(this, 200, 400));
            textFlow.flowComposer.updateAllControllers();
            // get first paragraph
            var p:ParagraphElement = textFlow.getChildAt(0) as ParagraphElement;
            // get next paragraph and display its content
            var nextParagraph:ParagraphElement = p.getNextParagraph();
            trace("nextParagraph.text is: " + nextParagraph.getText());
        }
    }
}
getPreviousParagraph | () | 메서드 | 
 public function getPreviousParagraph():ParagraphElement| 언어 버전: | ActionScript 3.0 | 
| 런타임 버전: | Flash Player 10, AIR 1.5 | 
TextFlow에서 첫 번째 단락인 경우 이 단락 뒤에 오는 단락이나 null을 반환합니다.
반환값ParagraphElement | 
관련 API 요소
예제 ( 예제 사용 방법 )
 이 예에서는 xml 마크업에서 세 개의 텍스트 단락을 가져오고, getChildAtIndex(1)를 사용하여 두 번째 단락에 액세스하며, getPreviousParagraph()를 사용하여 첫 번째 단락에 액세스합니다.
package flashx.textLayout.elements.examples
{
    import flash.display.Sprite;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    
    public class ParagraphElement_getPreviousParagraph  extends Sprite
    {
        public function ParagraphElement_getPreviousParagraph()
        {
            // create TextFlow object
            var textFlow:TextFlow = new TextFlow();        
            // create content for TextFlow using XML markup
            var simpleText:String = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<flow:TextFlow xmlns:flow=\"http://ns.adobe.com/textLayout/2008\">"+
                    "<flow:p>"+
                        "<flow:span>This is the first paragraph.</flow:span>"+    
                    "</flow:p>"+
                    "<flow:p>"+
                        "<flow:span>This is the second paragraph.</flow:span>"+    
                    "</flow:p>"+
                    "<flow:p>"+
                        "<flow:span>This is the third paragraph.</flow:span>"+ 
                    "</flow:p>"+
                "</flow:TextFlow>";
            // import the xml markup into a TextFlow object and display it on the stage
            textFlow = TextConverter.importToFlow(simpleText, TextConverter.TEXT_LAYOUT_FORMAT);
            textFlow.flowComposer.addController(new ContainerController(this, 200, 400));
            textFlow.flowComposer.updateAllControllers();
            // get second paragraph (first = 0)
            var p:ParagraphElement = textFlow.getChildAt(1) as ParagraphElement;
            // get  previous paragraph and display its content
            var prevParagraph:ParagraphElement = p.getPreviousParagraph();
            trace("prevParagraph.text is: " + prevParagraph.getText());
        }
    }
}
예제 예제 사용 방법 
ParagraphElementExample.as
 이 예에서는 세 개의 텍스트 단락을 만들어 서식을 지정합니다.
package flashx.textLayout.elements.examples
{
    import flash.display.Sprite;
    import flash.text.engine.FontPosture;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextLayoutFormat;
    public class ParagraphElementExample extends Sprite {
        
        // create the TextFlow object
        private var textFlow:TextFlow = new TextFlow();
        
        // Create Strings of text for the paragraphs
        private var para1String:String = "In the first paragraph of a "
        private var para1String2:String = "cheap" 
        private var para1String3:String ="Western novel, a cowboy meets a saloon girl.";
        private var para2String:String = "In the middle of the cheap novel a really bad guy, "+
                        "who is having a relationship with the saloon girl, sees the cowboy help "+
                        "her onto her horse as she smiles at him warmly."
        private var para3String:String = "In the last paragraph of the cheap novel, the cowboy kills "+
                            "the really bad guy in a shootout in the middle of main street and "+ 
                            "then rides into the sunset with the saloon girl on the back of his horse."; 
                  
        public function ParagraphElementExample()
        {
            // create a TextLayoutFormat object to use in formatting the paragraphs
            var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
            var paragraph1:ParagraphElement = new ParagraphElement();
            
            // create the ParagraphElement objects
            var paragraph2:ParagraphElement = new ParagraphElement();
            var paragraph3:ParagraphElement = new ParagraphElement();
            
            // create the SpanElement objects to hold the content of the paragraphs
            var p1Span1:SpanElement = new SpanElement();
            var p1Span2:SpanElement = new SpanElement();
            var p1Span3:SpanElement = new SpanElement();
            var p2Span:SpanElement = new SpanElement();
            var p3Span:SpanElement = new SpanElement();
            
            // assign the strings of text for the 1st paragraph to spans
            p1Span1.text = para1String;
            p1Span2.text = para1String2;
            p1Span2.fontStyle = FontPosture.ITALIC;  // italicize 'cheap'
            p1Span3.text = para1String3;
            
            // add spans to first paragraph
            paragraph1.addChild(p1Span1);
            paragraph1.addChild(p1Span2);
            paragraph1.addChild(p1Span3);
            
            // assign the string of text for the 2nd paragraph to a span
            // and add the span to the second paragraph
            p2Span.text = para2String;
            paragraph2.addChild(p2Span);
            
            // assign the string of text for the 3rd paragraph to a span
            // and add the span to the third paragraph
            p3Span.text = para3String;
            paragraph3.addChild(p3Span);
            
            // add the paragraphs to the TextFlow
            textFlow.addChild(paragraph1);
            textFlow.addChild(paragraph2);
            textFlow.addChild(paragraph3);
            
            // set the text formatting properties
            textLayoutFormat.fontSize = 14;
            textLayoutFormat.textIndent = 15;
            textLayoutFormat.paragraphSpaceAfter = 15;
            textLayoutFormat.paddingTop = 4;
            textLayoutFormat.paddingLeft = 4;
            
            // assign the format object to the TextFlow
            textFlow.hostFormat = textLayoutFormat;
            
            // assign a controller to the stage and update it to compose and 
            // display the text
            textFlow.flowComposer.addController(new ContainerController(this, 200, 400));
            textFlow.flowComposer.updateAllControllers();
        }
    }
}
ParagraphElementExample2.as
 이 예에서는 xml 마크업을 TextFlow 객체로 가져옵니다. xml 마크업은 위의 예와 동일한 세 개의 텍스트 단락 및 서식을 정의합니다.
package flashx.textLayout.elements.examples
{
    import flash.display.Sprite;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.container.ContainerController;
    
    public class ParagraphElementExample2 extends Sprite {
        
        // create the TextFlow object
        private var textFlow:TextFlow = new TextFlow();
        
        // xml markup that defines the attributes and contents of a text flow
        private var simpleText:String = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<flow:TextFlow xmlns:flow=\"http://ns.adobe.com/textLayout/2008\" verticalScrollPolicy=\"auto\" horizontalScrollPolicy=\"auto\" editingMode=\"readWrite\" fontSize=\"14\" textIndent=\"15\" marginBottom=\"15\" paddingTop=\"4\" paddingLeft=\"4\">"+
                    "<flow:p>"+
                        "<flow:span>In the first paragraph of a </flow:span>"+
                        "<flow:span fontStyle=\"italic\">cheap</flow:span>"+
                        "<flow:span> Western novel, a cowboy meets a saloon girl.</flow:span>"+
                    "</flow:p>"+
                    "<flow:p>"+
                        "<flow:span>In the middle of the cheap novel a really bad guy, </flow:span>"+
                        "<flow:span>who is having a relationship with the saloon girl, sees the cowboy help </flow:span>"+
                        "<flow:span>her onto her horse as she smiles at him warmly.</flow:span>"+ 
                    "</flow:p>"+
                    "<flow:p>"+
                        "<flow:span>In the last paragraph of the cheap novel, the cowboy kills the really </flow:span>"+ 
                        "<flow:span> bad guy in a shootout in the middle of main street and then rides into the sunset with </flow:span>"+
                        "<flow:span>the saloon girl on the back of his horse.</flow:span>" + 
                    "</flow:p>"+
                  "</flow:TextFlow>";
                  
        public function ParagraphElementExample2()
        {
            // import the xml markup into a TextFlow object and display it on the stage
            textFlow = TextConverter.importToFlow(simpleText, TextConverter.TEXT_LAYOUT_FORMAT);
            textFlow.flowComposer.addController(new ContainerController(this, 200, 400));
            textFlow.flowComposer.updateAllControllers();
        }
    }
}
Tue Jun 12 2018, 03:17 PM Z
 
 상속되는 공용 속성 숨기기
 상속되는 공용 속성 표시