| Package | flashx.textLayout.elements |
| Class | public final class DivElement |
| Inheritance | DivElement ContainerFormattedElement ParagraphFormattedElement FlowGroupElement FlowElement Object |
| Language Version: | ActionScript 3.0 |
| Runtime Versions: | Flash Player 10, AIR 1.5 |
See also
| Method | Defined By | ||
|---|---|---|---|
Constructor - creates a new DivElement object. | DivElement | ||
![]() | Appends a child FlowElement object. | FlowGroupElement | |
![]() | Adds a child FlowElement object at the specified index position. | FlowGroupElement | |
![]() | Makes a deep copy of the portion of a FlowElement object between two character positions, including any children,
and returns it as a FlowElement object. | FlowElement | |
![]() | Given a relative text position, find the index of the first child FlowElement that contains relative position. | FlowGroupElement | |
![]() | Given a relative text position, find the leaf element that contains the position. | FlowGroupElement | |
![]() | Returns the start location of the element in the text flow as an absolute index. | FlowElement | |
![]() | Returns the ContainerFormattedElement that specifies its containers for filling. | FlowElement | |
![]() | Returns the character at the specified position, relative to this FlowElement object. | FlowElement | |
![]() | Returns the character code at the specified position, relative to this FlowElement. | FlowElement | |
![]() | Returns the FlowElement child at the specified index. | FlowGroupElement | |
![]() | Searches in children for the specified FlowElement object and returns its index position. | FlowGroupElement | |
![]() | Return the effective column direction for this element. | ContainerFormattedElement | |
![]() | Returns the start of this element relative to an ancestor element. | FlowElement | |
![]() | Returns the first FlowLeafElement descendant of this element. | FlowGroupElement | |
![]() | Returns the last FlowLeafElement descendent of this element. | FlowGroupElement | |
![]() | Returns the next FlowElement sibling in the text flow hierarchy. | FlowElement | |
![]() | Returns the ParagraphElement object associated with this element. | FlowElement | |
![]() | Returns the previous FlowElement sibling in the text flow hierarchy. | FlowElement | |
![]() | Climbs the text flow hierarchy to return the root TextFlow object for the element. | FlowElement | |
![]() | Indicates whether an object has a specified property defined. | Object | |
![]() | Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | |
![]() | Indicates whether the specified property exists and is enumerable. | Object | |
![]() | Removes the specified child FlowElement object. | FlowGroupElement | |
![]() | Removes a child FlowElement object at the specified index position. | FlowGroupElement | |
![]() | Replaces child elements in the group with the specified new elements. | FlowGroupElement | |
![]() | Sets the availability of a dynamic property for loop operations. | Object | |
![]() | Makes a copy of the content of this FlowElement object that occurs between two character positions. | FlowElement | |
![]() | Splits this object at the position specified by the childIndex parameter. | FlowGroupElement | |
![]() | Splits this object at the position specified by the relativePosition parameter, where
the relative position is a relative text position in this element. | FlowGroupElement | |
![]() | Returns the string representation of the specified object. | Object | |
![]() | Returns the primitive value of the specified object. | Object | |
| DivElement | () | Constructor |
public function DivElement()| Language Version: | ActionScript 3.0 |
| Runtime Versions: | Flash Player 10, AIR 1.5 |
Constructor - creates a new DivElement object.
package {
import flash.display.Sprite;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.container.IContainerController;
import flashx.textLayout.container.DisplayObjectContainerController;
import flashx.textLayout.elements.DivElement;
import flashx.textLayout.elements.BreakElement;
public class DivElementExample extends Sprite{
var textFlow:TextFlow = new TextFlow();
public function DivElementExample(){
// create a div
var div:DivElement = new DivElement();
var paragraph1:ParagraphElement = new ParagraphElement();
var be:BreakElement = new BreakElement();
var p1Span1:SpanElement = new SpanElement();
p1Span1.text = "It was a dark and stormy night. ";
var p1Span2:SpanElement = new SpanElement();
p1Span2.text = "The quick red fox jumped over the lazy brown dog.";
p1Span2.lineThrough = true;
p1Span1.fontSize = p1Span2.fontSize = 14;
paragraph1.addChild(p1Span1);
paragraph1.addChild(p1Span2);
paragraph1.addChild(be);
div.addChild(paragraph1);
var paragraph2:ParagraphElement = new ParagraphElement();
var p2Span1:SpanElement = new SpanElement();
p2Span1.text = "Peter Piper picked a peck of pickle peppers.";
p2Span1.fontSize = 14;
paragraph2.addChild(p2Span1);
div.addChild(paragraph2);
textFlow.addChild(div);
textFlow.flowComposer.addController(new DisplayObjectContainerController(this,600,600));
textFlow.flowComposer.updateAllContainers();
}
}
}
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/labs/textlayout/flashx/textLayout/elements/DivElement.html