Appearance
hm5-types (source format) / TextElement
Interface: TextElement
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
blendMode? | | "color" | "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "add" | "difference" | "color-burn" | "color-dodge" | "linear-burn" | "hard-light" | "soft-light" | "exclusion" | "linear-light" | "pin-light" | "vivid-light" | "hard-mix" | "subtract" | "divide" | "saturation" | "luminosity" | "invert" | "layer" | "alpha" | "erase" | blend mode with what is under it; absent = normal. Switches at the next key of a classic tween. | ElementBase.blendMode |
box | object | area box; text wraps inside | - |
box.h | number | - | - |
box.w | number | - | - |
colorEffect? | ColorEffect | Look (symbol instances, bitmaps, text, meshes, groups, video objects: hasLook; loose shapes ignore it). Flash Color Effect (alpha stays opacity); absent = none. Classic tweens interpolate it. | ElementBase.colorEffect |
content | string | plain text (the runs joined, when there are runs) | - |
exportAsBitmap? | boolean | published as a picture in the atlas instead of live text (which scripts can change); absent = live text (owner 2026-10-26) | - |
filters? | InstanceFilter[] | Filters (drop shadow, blur, glow, …), drawn in order on top of the instance; absent = none. Classic tweens interpolate them (see filter/catalog.ts). | ElementBase.filters |
font | object | - | - |
font.align | "center" | "left" | "right" | "justify" | - | - |
font.bold | boolean | - | - |
font.color | string | - | - |
font.family | string | - | - |
font.italic | boolean | - | - |
font.size | number | - | - |
hidden? | boolean | Properties "Visible" off: not drawn in exports / publish (faint in the editor); a show action can still show it. Absent = drawn. | ElementBase.hidden |
id | string | - | ElementBase.id |
letterSpacing? | number | extra space between letters, in px; absent = 0 | - |
lineHeight? | number | line height as a multiple of the font size; absent = 1.25 | - |
multiline? | boolean | false = single line (no line breaks); absent = multi-line | - |
opacity | number | - | ElementBase.opacity |
overflow? | "visible" | "hidden" | "scroll" | text taller than the box: shown / clipped / clipped and scrollable at runtime; absent = "visible" | - |
runs? | TextRun[] | rich text; absent = the whole text uses font | - |
slot? | SlotRef | SLOT ITEM (owner 2026-11-20, plan 2026-11-19-mesh-slot-bone-puppet-plan 流程二): this object shows item item (an element id) of the slot profile profile (a LibrarySymbol with slotProfile). Its content (everything but ElementBase fields and a mesh object's deform) is a copy of the item, kept current by document syncSlotItems; its transform, look and pulls are its own. Absent = an ordinary object. | ElementBase.slot |
slots? | SlotRule[] | DRESS-UP RULES (owner 2026-11-20 "整套換"): for this object and everything inside it; later rules win, an outer object's rules win over an inner one's. THE meaning: document slotRules.ts. Absent = none. | ElementBase.slots |
strikethrough? | boolean | - | - |
t3d? | Transform3D | 3D rotation / depth (owner 2026-10-30, Flash CS4 style): symbol instances, bitmaps, text and groups (loose shapes ignore it). The object is drawn as a flat card turned about its own X / Y axes and seen through a perspective (t3d.ts). Absent = flat. | ElementBase.t3d |
textStroke? | object | an outline around the letters, drawn under the fill (the visible part outside the glyph = width / 2); color "RRGGBBAA"; absent = none | - |
textStroke.color | string | - | - |
textStroke.width | number | - | - |
textTransform? | "uppercase" | "lowercase" | "capitalize" | letter case as drawn (CSS text-transform; content keeps what was typed); absent = as typed (owner 2026-11-18, Text panel) | - |
transform | Mat2D | 2D affine matrix [a,b,c,d,tx,ty] | ElementBase.transform |
tweenDecimals? | number | a curve tween counting a number in this text (owner 2026-11-16): digits after the point (Properties "Decimals"); absent = as many as the keys' numbers show | - |
type | "text" | - | - |
underline? | boolean | a line under / through each line of horizontal text, in the base font's colour (vertical writing ignores them); absent = none | - |
verticalAlign? | "top" | "middle" | "bottom" | vertical position of the text in the box; absent = "top" | - |
wordWrap? | boolean | wrap at the box width; absent = true | - |
writingMode? | "horizontal" | "vertical" | "vertical" = Asian vertical writing (CSS vertical-rl): characters run top to bottom, columns right to left from the box's right edge; Latin runs are turned 90° clockwise. Then font.align places the text along the column (left = top, right = bottom, within box.h) and verticalAlign places the columns (top = right, bottom = left, within box.w); wrapping is at box.h. Absent = "horizontal". | - |