biz.neustar.wpm.api
Interface SeleniumFlash


public interface SeleniumFlash

The Selenium Flash API provided for interfacing with flash objects. The functions in this object represent the available Flash commands. The descriptions of the APIs for Flash objects as described here may or may not be accurate.


Method Summary
 java.lang.String call(java.lang.String functionName, java.lang.String... args)
          Calls a function of the flash object
 java.lang.String FSCommand(java.lang.String command, java.lang.String... args)
          Lets the flash object communicate with either another flash object or the browser.
 java.lang.String GetVariable(java.lang.String varName)
          Gets the variable value
 void GotoFrame(int frameNumber)
          Goes to a certain frame of the flash object
 boolean IsPlaying()
          Checks whether the flash object is playing or not.
 void LoadMovie(int layerNumber, java.lang.String url)
          Loads a SWF, JPEG, GIF, or PNG file into a movie clip in Flash Player while the original SWF file is playing.
 void OnProgress(int percent)
          Generated as the Flash object is downloading.
 void OnReadyStateChange(int state)
          Generated as the ready state of the flash object changes.
 void Pan(int x, int y, int mode)
          Pans the current image frame.
 int PercentLoaded()
          How much of the flash object was loaded so far
 void Play()
          Plays the flash object
 void Rewind()
          Rewinds the flash object
 void SetVariable(java.lang.String varName, java.lang.String varValue)
          Sets the flash variable value
 void SetZoomRect(int left, int top, int right, int bottom)
          Zooms in an area of the flash object
 void StopPlay()
          Stops playing the flash object
 void TCallFrame(java.lang.String target, int frameNumber)
          Execute the action associated with frame number on the targeted timeline
 void TCallLabel(java.lang.String target, java.lang.String label)
          Execute the action associated with the frame that has the given label on the targeted timeline
 int TCurrentFrame(java.lang.String target)
          Returns the current frame number for the target timeline
 java.lang.String TCurrentLabel(java.lang.String target)
          Returns the current frame's label for the target timeline
 java.lang.String TGetProperty(java.lang.String target, java.lang.String property)
          Returns the property value for the target timeline
 int TGetPropertyAsNumber(java.lang.String target, java.lang.String property)
          Returns the property value as a number for the target timeline
 void TGotoFrame(java.lang.String target, int frameNumber)
          Goes to frame number of the targeted timeline
 void TGotoLabel(java.lang.String target, java.lang.String label)
          Goes to frame with the given label of the targeted timeline
 int TotalFrames()
          Gets the total frames of the flash object
 void TPlay(java.lang.String target)
          Plays the targeted timeline
 void TSetProperty(java.lang.String target, java.lang.String property, java.lang.String value)
          Sets the property value at the targeted timeline
 void TStopPlay(java.lang.String target)
          Stops the targeted timeline.
 void Zoom(int percent)
          Zooms in ont he flash object by a percent
 

Method Detail

call

java.lang.String call(java.lang.String functionName,
                      java.lang.String... args)
Calls a function of the flash object

Parameters:
functionName - the function to call
args - the arguments to pass to function
Returns:
the function's return value

GetVariable

java.lang.String GetVariable(java.lang.String varName)
Gets the variable value

Parameters:
varName - the variable name
Returns:
the variable value

GotoFrame

void GotoFrame(int frameNumber)
Goes to a certain frame of the flash object

Parameters:
frameNumber - the frame number

IsPlaying

boolean IsPlaying()
Checks whether the flash object is playing or not.

Returns:
true if flash object is playing, false otherwise

LoadMovie

void LoadMovie(int layerNumber,
               java.lang.String url)
Loads a SWF, JPEG, GIF, or PNG file into a movie clip in Flash Player while the original SWF file is playing.

Parameters:
layerNumber - the layer number
url - the url of the SWF or JPEG file to be loaded

Pan

void Pan(int x,
         int y,
         int mode)
Pans the current image frame.

Parameters:
x - the x-coordinate to pan to
y - the y-coordinate to pan to
mode - the pan mode

PercentLoaded

int PercentLoaded()
How much of the flash object was loaded so far

Returns:
percent of how much the flash object has loaded (0% - 100%)

Play

void Play()
Plays the flash object


Rewind

void Rewind()
Rewinds the flash object


SetVariable

void SetVariable(java.lang.String varName,
                 java.lang.String varValue)
Sets the flash variable value

Parameters:
varName - the variable name
varValue - the new variable value

SetZoomRect

void SetZoomRect(int left,
                 int top,
                 int right,
                 int bottom)
Zooms in an area of the flash object

Parameters:
left - the left position to zoom in to
top - the top position to zoom in to
right - the right position to zoom in to
bottom - the bottom position to zoom in to

StopPlay

void StopPlay()
Stops playing the flash object


TotalFrames

int TotalFrames()
Gets the total frames of the flash object

Returns:
the total frames of the flash object

Zoom

void Zoom(int percent)
Zooms in ont he flash object by a percent

Parameters:
percent - the percent to zoom

TCallFrame

void TCallFrame(java.lang.String target,
                int frameNumber)
Execute the action associated with frame number on the targeted timeline

Parameters:
target - the timeline target
frameNumber - the frame

TCallLabel

void TCallLabel(java.lang.String target,
                java.lang.String label)
Execute the action associated with the frame that has the given label on the targeted timeline

Parameters:
target - the timeline target
label - the label

TCurrentFrame

int TCurrentFrame(java.lang.String target)
Returns the current frame number for the target timeline

Parameters:
target - the timeline target
Returns:
the current frame number

TCurrentLabel

java.lang.String TCurrentLabel(java.lang.String target)
Returns the current frame's label for the target timeline

Parameters:
target - the timeline target
Returns:
the current frame's label

TGetProperty

java.lang.String TGetProperty(java.lang.String target,
                              java.lang.String property)
Returns the property value for the target timeline

Parameters:
target - the timeline target
property - the property name
Returns:
the property's value

TGetPropertyAsNumber

int TGetPropertyAsNumber(java.lang.String target,
                         java.lang.String property)
Returns the property value as a number for the target timeline

Parameters:
target - the timeline target
property - the property name
Returns:
the property's value as a number

TGotoFrame

void TGotoFrame(java.lang.String target,
                int frameNumber)
Goes to frame number of the targeted timeline

Parameters:
target - the timeline target
frameNumber - the frame number

TGotoLabel

void TGotoLabel(java.lang.String target,
                java.lang.String label)
Goes to frame with the given label of the targeted timeline

Parameters:
target - the timeline target
label - the frame label

TPlay

void TPlay(java.lang.String target)
Plays the targeted timeline

Parameters:
target - the timeline target

TSetProperty

void TSetProperty(java.lang.String target,
                  java.lang.String property,
                  java.lang.String value)
Sets the property value at the targeted timeline

Parameters:
target - the timeline target
property - the property name
value - the property's value

TStopPlay

void TStopPlay(java.lang.String target)
Stops the targeted timeline.

Parameters:
target - the timeline target

OnProgress

void OnProgress(int percent)
Generated as the Flash object is downloading.

Parameters:
percent - the progress percent

OnReadyStateChange

void OnReadyStateChange(int state)
Generated as the ready state of the flash object changes. 1 = Uninitialized 2 = Loaded 3 = Interactive 4 = Complete

Parameters:
state - the state

FSCommand

java.lang.String FSCommand(java.lang.String command,
                           java.lang.String... args)
Lets the flash object communicate with either another flash object or the browser.

Parameters:
command - A string passed to the application for any use, or a command passed to another flash object
args - A string passed to the application for any use, or a value passed to another flash object
Returns:
the return value from passing the information

Copyright © 2014 Neustar, Inc. All Rights Reserved.