Package | impression.players |
Class | public class RTFPlayer |
Inheritance | RTFPlayer ![]() ![]() ![]() |
See also
Method | Defined By | ||
---|---|---|---|
RTFPlayer(renderingSurface:Sprite = null, resolver:AssetResolver = null)
Creates a new instance of the RTFPlayer. | RTFPlayer | ||
![]() | checkForComplete():void
Causes the player to examine the completion criteria for the current storyboard. | BasePlayer | |
![]() | clearStyle(style:String):void
Deletes a style property, reverting it back to its default value. | RenderingPlayer | |
getStoryboardState(sb:Storyboard):String [static]
Creates a string describing the state of the storyboard. | RTFPlayer | ||
![]() | getStyle(style:String):Object
Retrieves a style property. | RenderingPlayer | |
getStyleDefinition():Object [static]
Retrieves the default style map for the RTFPlayer. | RTFPlayer | ||
![]() | redraw():void
Forces a complete redraw of the content. | RenderingPlayer | |
resetStoryboard(sb:Storyboard):void [static]
Removes all properties set by the player. | RTFPlayer | ||
setStoryboardState(sb:Storyboard, state:String):void [static]
Modifies the storyboard to match the described state passed. | RTFPlayer | ||
![]() | setStyle(style:String, value:Object):void
Sets a style property. | RenderingPlayer |
Method | Defined By | ||
---|---|---|---|
![]() | detachSurface():void
Removes any connections between the rendering surface and the player. | RenderingPlayer | |
eraseSurface():void [override]
Removes all content from the surface. | RTFPlayer | ||
![]() | initializeStoryboard():void
Initializes the storyboard. | BasePlayer | |
![]() | loadStoryboard():void [override]
Loads the storyboard. | RenderingPlayer | |
![]() | maskSurface():void
Adds a mask to the rendering surface if the maskRenderingSurface style property value is true. | RenderingPlayer | |
![]() |
Removes known completion criteria from the CompleteRemaining storyboard persisted property. | BasePlayer | |
![]() | renderBackground():void
Draws the background rectangle onto the rendering surface. | RenderingPlayer | |
renderContent():void [override]
Renders the content onto the surface. | RTFPlayer | ||
![]() | unloadStoryboard():void [override]
Performs cleanup actions when a storyboard is unloaded. | RenderingPlayer |
Style | Description | Defined By | ||
---|---|---|---|---|
antiAliasType | Type: String The type of anti-aliasing used for this text field. Use AntiAliasType.ADVANCED . | RTFPlayer | ||
![]() | Type: Boolean Whether or not the primary asset should be resized when loaded to width x height . | RenderingPlayer | ||
![]() | Type: Number The background color transparency of the rendering surface. | RenderingPlayer | ||
![]() | Type: uint Format: Color The background color of the rendering surface. | RenderingPlayer | ||
bulletChar | Type: String Specifies the character to use for the bullet for unordered lists. The default value is "●" (character code 0x25CF) . | RTFPlayer | ||
bulletFont | Type: String The font family name used for the bullet character in unordered lists. The default value is "Arial" . | RTFPlayer | ||
bulletScale | Type: Number Indicates the scale factor to use for the font size for the bullet character in unordered lists. The default value is 1 . | RTFPlayer | ||
![]() | Type: Boolean The value of all assets' cacheAsBitmap property that the player should set once the asset is loaded. | RenderingPlayer | ||
cacheConvertedRTF | Type: Boolean Specifies when the RTFText property should be converted to Flash-conformant HTML.
If this style value is false . | RTFPlayer | ||
![]() | Type: Object The default LoaderContext object to use when assets are loaded. | RenderingPlayer | ||
defaultBackgroundImageAlpha | Type: Number Specifies the default opacity of the background image. This style value is only used if the 0.5 . | RTFPlayer | ||
defaultTextFormat | Type: flash.text.TextFormat The TextFormat object to use during conversion. The default value is null . | RTFPlayer | ||
embedFonts | Type: Boolean Indicates whether embedded fonts should be used. The default value is false . | RTFPlayer | ||
forceDefaultFont | Type: Boolean Indicates whether font changes in the source RTF should be removed and replaced with the default font name. The default value is false . | RTFPlayer | ||
![]() | Type: Number Format: Length The height of the rendering surface, in pixels. | RenderingPlayer | ||
![]() | Type: Boolean Whether or not the rendering surface should be masked to width x height . | RenderingPlayer | ||
tabStopInterval | Type: Number Indicates the interval, in pixels, of tab stops used during conversion. Tab stops will be generated for every tabStopInterval interval from 0 to tabStopMax .
The default value is 20 . | RTFPlayer | ||
tabStopMax | Type: Boolean Indicates the maximum value, of the tab stops used during conversion. The default value is 3000 . | RTFPlayer | ||
textFieldMarginX | Type: Number Specifies the horizontal spacing between the internal TextField and the rendering surface. The default value is 20 . | RTFPlayer | ||
textFieldMarginY | Type: Number Specifies the vertical spacing between the internal TextField and the rendering surface. The default value is 20 . | RTFPlayer | ||
![]() | Type: Number Format: Length The width of the rendering surface, in pixels. | RenderingPlayer |
RTFPlayer | () | Constructor |
public function RTFPlayer(renderingSurface:Sprite = null, resolver:AssetResolver = null)
Creates a new instance of the RTFPlayer.
ParametersrenderingSurface:Sprite (default = null ) — The object to render content on.
| |
resolver:AssetResolver (default = null ) — The AssetResolver to use to request external assets.
|
eraseSurface | () | method |
override protected function eraseSurface():void
Removes all content from the surface.
This method is invoked by the player when a storyboard is unloaded or when the redraw()
method is
invoked. When erasing a rendering surface, the RTFPlayer performs the following actions:
See also
getStoryboardState | () | method |
public static function getStoryboardState(sb:Storyboard):String
Creates a string describing the state of the storyboard.
This method returns a single character to describe
the state of the storyboard. If the storyboard is marked complete,
"c
" is returned. If the storyboard has been
initialized, but is not marked complete, "i
" is
returned. Otherwise ".
" is returned.
Note that this string only describes the state that the player is aware of. If the shell stores additional data in the storyboard, it is the shell's responsibility to store the additional data if it is needed.
Parameters
sb:Storyboard — The storyboard to describe the state of.
|
String — The state of the storyboard.
|
getStyleDefinition | () | method |
public static function getStyleDefinition():Object
Retrieves the default style map for the RTFPlayer.
ReturnsObject — Default styles object.
|
renderContent | () | method |
override protected function renderContent():void
Renders the content onto the surface.
To render content, the RTFPlayer performs the following actions:
resetStoryboard | () | method |
public static function resetStoryboard(sb:Storyboard):void
Removes all properties set by the player.
Note that this method also removes interim completion properties used by the player, but not necessarily set by the player.
Parameters
sb:Storyboard — The storyboard to remove properties from.
This method removes the following properties from a storyboard:
|
See also
setStoryboardState | () | method |
public static function setStoryboardState(sb:Storyboard, state:String):void
Modifies the storyboard to match the described state passed.
If the value of state
is "c
" (indicating a completed
storyboard), interim completion criteria will be marked as complete in addition to the overall
storyboard state.
State values created using a function other than getStoryboardState
may not work.
Parameters
sb:Storyboard — The Storyboard object to modify.
| |
state:String — A String created using the getStoryboardState() method containing the state to restore.
|