Package | impression.players |
Class | public class FlashObjectPlayer |
Inheritance | FlashObjectPlayer ![]() ![]() ![]() |
The FlashObjectPlayer injects a reference to itself in the loaded .SWF file (as the
.player
property) at the root level of the .SWF. This injection allows
the loaded .SWF object to communicate with the player. Content and shell authors can define
a bidirectional communication architecture that deeply integrates the content with the
runtime.
The sample shell included in the DevKit shows one possible approach to bidirectional communication.
Property | Defined By | ||
---|---|---|---|
![]() | alwaysCheckComplete : Boolean
Specifies how the object should handle storyboard completion. | BasePlayer | |
_content : DisplayObject [read-only]
Returns the DispalyObject associated with the loader. | FlashObjectPlayer | ||
_loader : LoaderEx [read-only]
Returns the loader object. | FlashObjectPlayer | ||
![]() | narrationComplete : Boolean
Indicates whether narration has finished playing. | BasePlayer | |
![]() | renderingSurface : Sprite
The object to render content on. | RenderingPlayer | |
![]() | resolver : AssetResolver
The AssetResolver to use to request external assets. | RenderingPlayer | |
![]() | storyboard : Storyboard [override]
The storyboard associated with the player. | RenderingPlayer |
Method | Defined By | ||
---|---|---|---|
FlashObjectPlayer(renderingSurface:Sprite = null, resolver:AssetResolver = null)
Creates a new instance of the FlashObjectPlayer. | FlashObjectPlayer | ||
![]() | 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] | FlashObjectPlayer | ||
![]() | getStyle(style:String):Object
Retrieves a style property. | RenderingPlayer | |
getStyleDefinition():Object [static]
Retrieves the default style map for the FlashObjectPlayer. | FlashObjectPlayer | ||
![]() | redraw():void
Forces a complete redraw of the content. | RenderingPlayer | |
resetStoryboard(sb:Storyboard):void [static]
Removes all properties set by the player. | FlashObjectPlayer | ||
setStoryboardState(sb:Storyboard, state:String):void [static] | FlashObjectPlayer | ||
![]() | setStyle(style:String, value:Object):void
Sets a style property. | RenderingPlayer |
Method | Defined By | ||
---|---|---|---|
detachSurface():void [override]
Removes any connections between the rendering surface and the player. | FlashObjectPlayer | ||
eraseSurface():void [override]
Removes all content from the surface. | FlashObjectPlayer | ||
![]() | 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 | |
[override]
Removes known completion criteria from the CompleteRemaining storyboard persisted property. | FlashObjectPlayer | ||
![]() | renderBackground():void
Draws the background rectangle onto the rendering surface. | RenderingPlayer | |
renderContent():void [override]
Renders the content onto the surface. | FlashObjectPlayer | ||
unloadStoryboard():void [override]
Performs cleanup actions when a storyboard is unloaded. | FlashObjectPlayer |
_content | property |
_content:DisplayObject
[read-only] Returns the DispalyObject associated with the loader.
public function get _content():DisplayObject
_loader | property |
_loader:LoaderEx
[read-only] Returns the loader object.
public function get _loader():LoaderEx
FlashObjectPlayer | () | Constructor |
public function FlashObjectPlayer(renderingSurface:Sprite = null, resolver:AssetResolver = null)
Creates a new instance of the FlashObjectPlayer.
ParametersrenderingSurface:Sprite (default = null ) — The object to render content on.
| |
resolver:AssetResolver (default = null ) — The AssetResolver to use to request external assets.
|
detachSurface | () | method |
override protected function detachSurface():void
Removes any connections between the rendering surface and the player.
This method is invoked by the player when a storyboard is unloaded, the redraw()
method is
invoked, or the renderingSurface
property is changed. When detaching a rendering surface, the
FlashObjectPlayer performs the following actions:
See also
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 FlashObjectPlayer performs the following actions:
See also
getStoryboardState | () | method |
public static function getStoryboardState(sb:Storyboard):String
Parameters
sb:Storyboard |
String |
getStyleDefinition | () | method |
public static function getStyleDefinition():Object
Retrieves the default style map for the FlashObjectPlayer.
ReturnsObject — Default styles object.
|
removeCompleteRemainingCriteria | () | method |
override protected function removeCompleteRemainingCriteria():void
Removes known completion criteria from the CompleteRemaining
storyboard persisted property.
This method is invoked by the checkForComplete()
method if the value of the storyboard
property is not null
, and the complete
event has not been dispatched since the storyboard
was loaded.
The Content Creation Tool allows content authors to add a value of objectDefined;
to the
CompleteWhen
persisted property. The FlashObjectPlayer does not remove this value. It is expected
that the loaded Flash object or the shell itself will remove the value.
See also
renderContent | () | method |
override protected function renderContent():void
Renders the content onto the surface.
To render content, the FlashObjectPlayer performs the following actions:
Note that the reference to the player is not injected into the Flash object until
the loader responsible for loading the Flash object dispatches the Event.INIT
event.
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:
|
setStoryboardState | () | method |
public static function setStoryboardState(sb:Storyboard, state:String):void
Parameters
sb:Storyboard | |
state:String |
unloadStoryboard | () | method |
override protected function unloadStoryboard():void
Performs cleanup actions when a storyboard is unloaded.
This method is invoked by the storyboard
property set method when the current value of the property
is not null
and the unload
event has not been cancelled. For the BasePlayer, this
method removes the internal reference to the old storyboard.
When unloading a storyboard, the FlashObjectPlayer performs the following actions:
See also