org.eclipse.actf.model.flash

## Class FlashPlayer

- java.lang.Object
- - org.eclipse.actf.model.flash.FlashPlayer

All Implemented Interfaces:
  IASBridge, IFlashConst, IFlashPlayer

    public class FlashPlayer
    extends Object
    implements IFlashPlayer

Default implementation of `IFlashPlayer`

See Also:
  `FlashPlayerFactory`

### Field Summary

### Fields inherited from interface org.eclipse.actf.model.flash.IFlashConst

`ACC_IMPL, ACC_PROPS, ACCINFO_DEFAULTACTION, ACCINFO_DESCRIPTION, ACCINFO_FORCESIMPLE, ACCINFO_NAME, ACCINFO_ROLE, ACCINFO_SHORTCUT, ACCINFO_SILENT, ACCINFO_STATE, ASNODE_ACCINFO, ASNODE_CLASS_ARRAY, ASNODE_CLASS_BUTTON, ASNODE_CLASS_NAME, ASNODE_CLASS_SHAPE, ASNODE_CLASS_TEXTFIELD, ASNODE_CURRENT_FRAME, ASNODE_DEPTH, ASNODE_HEIGHT, ASNODE_ICON_ACCPROPS, ASNODE_ICON_ACCROLE, ASNODE_ICON_COMPONENT, ASNODE_ICON_FLASH, ASNODE_ICON_OTHERS, ASNODE_ICON_TEXT, ASNODE_ICON_VARIABLE, ASNODE_ID, ASNODE_IS_INPUTABLE, ASNODE_IS_OPAQUE_OBJECT, ASNODE_IS_UI_COMPONENT, ASNODE_OBJECT_NAME, ASNODE_TAB_INDEX, ASNODE_TARGET, ASNODE_TEXT, ASNODE_TITLE, ASNODE_TYPE, ASNODE_TYPE_BOOLEAN, ASNODE_TYPE_DISPLAYOBJECT, ASNODE_TYPE_FUNCTION, ASNODE_TYPE_MOVIECLIP, ASNODE_TYPE_NULL, ASNODE_TYPE_NUMBER, ASNODE_TYPE_OBJECT, ASNODE_TYPE_STRING, ASNODE_TYPE_UNDEFINED, ASNODE_VALUE, ASNODE_WIDTH, ASNODE_X, ASNODE_Y, ATTR_WMODE, CLSID_FLASH, COMPLETED_READY_STATE, CONTENT_URL, DISPATCH_METHOD, INVALID_DEPTH, M_CALL_METHOD, M_CLEAR_ALL_MARKERS, M_GET_CHILD_NODES, M_GET_CONTENT_ID, M_GET_CURRENT_POSITION, M_GET_INNER_NODES, M_GET_NODE_AT_DEPTH, M_GET_NODE_FROM_PATH, M_GET_NUM_CHILD_NODES, M_GET_NUM_SUCCESSOR_NODES, M_GET_PROPERTY, M_GET_ROOT_NODE, M_GET_SUCCESSOR_NODES, M_GET_SWF_VERSION, M_GET_VOLUME, M_NEW_MARKER, M_ON_PRESS, M_ON_RELEASE, M_ON_ROLL_OUT, M_ON_ROLL_OVER, M_PAUSE, M_PLAY, M_REPAIR_FLASH, M_SEARCH_SOUND, M_SEARCH_VIDEO, M_SET_FOCUS, M_SET_MARKER, M_SET_PROPERTY, M_SET_VOLUME, M_STOP, M_TRANSLATE, M_UNSET_MARKER, M_UPDATE_TARGET, PATH_BRIDGELEVEL, PATH_CONTENT_ID, PATH_GLOBAL, PATH_IS_AVAILABLE, PATH_ON_PRESS, PATH_ON_RELEASE, PATH_ROOTLEVEL, PLAYER_GET_VARIABLE, PLAYER_SET_ATTRIBUTE, PLAYER_SET_VARIABLE, PLAYER_VERSION, PROP_REQUEST_ARGS, PROP_RESPONSE_VALUE, READY_STATE, V_OPAQUE, V_TRANSPARENT`

### Method Summary

Methods
`Object` `callMethod(IASNode targetNode, String method)` Call ActionScript method of target `IASNode`
`Object` `callMethod(IASNode targetNode, String method, Object[] args)` Call ActionScript method of target `IASNode`
`boolean` `clearAllMarkers()` Clear all markers
`FlashMSAAObject` `getAccessible()`
`IASNode[]` `getChildren(IASNode parentNode, boolean visual, boolean debugMode)` Get children of specified parent `IASNode`
`String` `getContentURL()`
`IDispatch` `getDispatch()`
`IASNode` `getNodeAtDepthWithPath(String path, int depth)` Get `IASNode` at specified depth and path
`IASNode` `getNodeFromPath(String path)` Get `IASNode` at specified path
`String` `getPlayerProperty(String propertyName)` Get Property from FlashPlayer Node
`String` `getPlayerVersion()`
`Object` `getProperty(String path, String prop)` Get Property value at specified path
`IASNode` `getRootNode()`
`String` `getStatus()`
`int` `getSWFVersion()`
`int` `getWindow()`
`String` `getWMode()`
`boolean` `hasChild(IASNode parentNode, boolean visual, boolean debugMode)`
`boolean` `isReady()`
`boolean` `isVisible()`
`void` `repairFlash()` Repair flash content
`IASNode[]` `searchSound()`
`IASNode[]` `searchVideo()`
`boolean` `setFocus(String target)` Focus specified target
`boolean` `setMarker(IASNode node)` Set marker on the specified `IASNode` position
`boolean` `setMarker(Number x, Number y, Number width, Number height)` Set marker at specified position and size
`void` `setPlayerProperty(String propertyName, String value)` Set Property to FlashPlayer Node
`void` `setProperty(String path, String prop, Object value)` Set Property value at specified path
`IASNode[]` `translateWithPath(String path)`
`boolean` `unsetMarker()` Unset current marker
`boolean` `updateTarget()`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### getAccessible

    public FlashMSAAObject getAccessible()

Specified by:
  `getAccessible` in interface `IFlashPlayer`
Returns:
  native MSAA object of the FlashPlayer as `FlashMSAAObject`

#### isReady

    public boolean isReady()

Specified by:
  `isReady` in interface `IFlashPlayer`
Returns:
  whether the HTML document that the FlashPlayer belongs to is ready or not.

#### isVisible

    public boolean isVisible()

Specified by:
  `isVisible` in interface `IFlashPlayer`
Returns:
  whether this Flash object is visible or not. Invisible means that the Flash object is in window-less mode.

#### getRootNode

    public IASNode getRootNode()

Specified by:
  `getRootNode` in interface `IASBridge`
Returns:
  root `IASNode`

#### getNodeFromPath

    public IASNode getNodeFromPath(String path)

Description copied from interface: `IASBridge`
Get `IASNode` at specified path

Specified by:
  `getNodeFromPath` in interface `IASBridge`
Parameters:
  `path` - target path
Returns:
  `IASNode` or null if not available

#### getNodeAtDepthWithPath

    public IASNode getNodeAtDepthWithPath(String path,
                                 int depth)

Description copied from interface: `IASBridge`
Get `IASNode` at specified depth and path

Specified by:
  `getNodeAtDepthWithPath` in interface `IASBridge`
Parameters:
  `path` - target path
  `depth` - target depth
Returns:
  `IASNode` or null if not available

#### translateWithPath

    public IASNode[] translateWithPath(String path)

Specified by:
  `translateWithPath` in interface `IASBridge`
Parameters:
  `path` - target path
Returns:
  true if succeeded

#### hasChild

    public boolean hasChild(IASNode parentNode,
                   boolean visual,
                   boolean debugMode)

Specified by:
  `hasChild` in interface `IASBridge`
Parameters:
  `parentNode` - target parent `IASNode`
  `visual` -
  - true: use visual structure (use AS `getInnerNodes` method)
  - false: use object structure
  `debugMode` -
  - true: check all entities including the internal variables. Apparent parent-child relationships are used as specified, even if there are circular references.
  - false: check without the internal variables. Circular references are removed.
Returns:
  true if the parent node has child

#### getChildren

    public IASNode[] getChildren(IASNode parentNode,
                        boolean visual,
                        boolean debugMode)

Description copied from interface: `IASBridge`
Get children of specified parent `IASNode`

Specified by:
  `getChildren` in interface `IASBridge`
Parameters:
  `parentNode` - target parent node
  `visual` -
  - true: use visual structure (use AS `getInnerNodes` method)
  - false: use object structure
  `debugMode` -
  - true: list all entities including the internal variables. Apparent parent-child relationships are used as specified, even if there are circular references.
  - false: list children without the internal variables. Circular references are removed.
Returns:
  children of the node as `IASNode` array

#### searchVideo

    public IASNode[] searchVideo()

Specified by:
  `searchVideo` in interface `IASBridge`
Returns:
  video objects in the content as `IASNode` array

#### searchSound

    public IASNode[] searchSound()

Specified by:
  `searchSound` in interface `IASBridge`
Returns:
  sound objects in the content as `IASNode` array

#### setMarker

    public boolean setMarker(Number x,
                    Number y,
                    Number width,
                    Number height)

Description copied from interface: `IASBridge`
Set marker at specified position and size

Specified by:
  `setMarker` in interface `IASBridge`
Parameters:
  `x` - x coordinates
  `y` - y coordinates
  `width` - width
  `height` - height
Returns:
  true if succeeded

#### setMarker

    public boolean setMarker(IASNode node)

Description copied from interface: `IASBridge`
Set marker on the specified `IASNode` position

Specified by:
  `setMarker` in interface `IASBridge`
Parameters:
  `node` - target `IASNode`
Returns:
  true if succeeded

#### unsetMarker

    public boolean unsetMarker()

Description copied from interface: `IASBridge`
Unset current marker

Specified by:
  `unsetMarker` in interface `IASBridge`
Returns:
  true if succeeded

#### clearAllMarkers

    public boolean clearAllMarkers()

Description copied from interface: `IASBridge`
Clear all markers

Specified by:
  `clearAllMarkers` in interface `IASBridge`
Returns:
  true if succeeded

#### setFocus

    public boolean setFocus(String target)

Description copied from interface: `IASBridge`
Focus specified target

Specified by:
  `setFocus` in interface `IASBridge`
Parameters:
  `target` - full instance name of the node
Returns:
  true if succeeded
See Also:
  `IASNode.getTarget()`, `IFlashConst.M_SET_FOCUS`

#### getProperty

    public Object getProperty(String path,
                     String prop)

Description copied from interface: `IASBridge`
Get Property value at specified path

Specified by:
  `getProperty` in interface `IASBridge`
Parameters:
  `path` - target path
  `prop` - target property name
Returns:
  resulting property value

#### setProperty

    public void setProperty(String path,
                   String prop,
                   Object value)

Description copied from interface: `IASBridge`
Set Property value at specified path

Specified by:
  `setProperty` in interface `IASBridge`
Parameters:
  `path` - target path
  `prop` - target property name
  `value` - target property value

#### updateTarget

    public boolean updateTarget()

Specified by:
  `updateTarget` in interface `IASBridge`
Returns:
  true if succeeded

#### repairFlash

    public void repairFlash()

Description copied from interface: `IASBridge`
Repair flash content

Specified by:
  `repairFlash` in interface `IASBridge`

#### callMethod

    public Object callMethod(IASNode targetNode,
                    String method)

Description copied from interface: `IASBridge`
Call ActionScript method of target `IASNode`

Specified by:
  `callMethod` in interface `IASBridge`
Parameters:
  `targetNode` - target node
  `method` - target method
Returns:
  resulting Object

#### callMethod

    public Object callMethod(IASNode targetNode,
                    String method,
                    Object[] args)

Description copied from interface: `IASBridge`
Call ActionScript method of target `IASNode`

Specified by:
  `callMethod` in interface `IASBridge`
Parameters:
  `targetNode` - target node
  `method` - target method
  `args` - arguments
Returns:
  resulting Object

#### getStatus

    public String getStatus()

Specified by:
  `getStatus` in interface `IFlashPlayer`
Returns:
  status message

#### getWMode

    public String getWMode()

Specified by:
  `getWMode` in interface `IFlashPlayer`
Returns:
  WMode of the FlashPlayer

#### setPlayerProperty

    public void setPlayerProperty(String propertyName,
                         String value)

Description copied from interface: `IFlashPlayer`
Set Property to FlashPlayer Node

Specified by:
  `setPlayerProperty` in interface `IFlashPlayer`
Parameters:
  `propertyName` - target property name
  `value` - property value to set

#### getPlayerProperty

    public String getPlayerProperty(String propertyName)

Description copied from interface: `IFlashPlayer`
Get Property from FlashPlayer Node

Specified by:
  `getPlayerProperty` in interface `IFlashPlayer`
Parameters:
  `propertyName` - target property name
Returns:
  property value

#### getWindow

    public int getWindow()

Specified by:
  `getWindow` in interface `IFlashPlayer`
Returns:
  window handle of FlashPlayer
See Also:
  `FlashMSAAObject.getWindow()`

#### getDispatch

    public IDispatch getDispatch()

Specified by:
  `getDispatch` in interface `IFlashPlayer`
Returns:
  IDispatch object of the FlashPlayer

#### getPlayerVersion

    public String getPlayerVersion()

Specified by:
  `getPlayerVersion` in interface `IFlashPlayer`
Returns:
  version of FlashPlayer

#### getContentURL

    public String getContentURL()

Specified by:
  `getContentURL` in interface `IFlashPlayer`
Returns:
  URL of Flash content

#### getSWFVersion

    public int getSWFVersion()

Specified by:
  `getSWFVersion` in interface `IFlashPlayer`
Returns:
  SWF version of current content