Name: mobileControlDo

Type: command

Syntax: mobileControlDo <idOrName>, <action>, ...action specific parameters...

Summary: Execute specific behaviors of native mobile controls created using <mobileControlCreate>.

Synonyms: iphoneControlDo

Introduced: 4.6

OS: ios,android

Platforms: mobile

Example:
mobileControlDo "myPlayerControl", "play"

Example:
mobileControlDo tScrollerControlID, "flashScrollIndicators"

Example:
mobileControlDo tBrowserControlName, "execute", "alert('javascript browser test')"

Example:
mobileControlDo tFieldControlName, "focus"

Example:
// set the focus for a multi-line text field
mobileControlDo "myMultiLineTextInput", "focus"

Parameters:
idOrName: The id or name of the control.
action (enum): The action to perform. Browser Specific Actions Scroller Specific Actions (iOS Only) Player Specific Actions Text Input Specific Actions Multi-line Text Input Specific Actions Multi-line Text Input Specific Actions (iOS Only)
- "advance": Move forward through the history (wraps the goForward method of UIWebView).
- "retreat": Move backward through the history (wraps the goBack method of UIWebView).
- "reload": Reload the current page (wraps the reload method of UIWebView).
- "stop": Stop loading the current page (wraps the stopLoading method of UIWebView).
- "load baseUrl, htmlText": Loads as page consisting of the given htmlText with the given baseUrl (wraps theloadHtmlString method of UIWebView). Takes the following additional parameters:
	- "baseUrl": 
	- "htmlText": 
- "execute, script": Evaluates the given JavaScript script in the context of the current page (wraps the stringByEvaluationJavaScriptFromString method of UIWebView). Takes the following additional parameter:
	- "script": 
- "flashScrollIndicators": Makes the scroll indicators flash momentarily.
- "play": Start playing the content of the player.
- "pause": Pause the content at the current position.
- "stop": Stop playing the content of the player.
- "prepareToPlay" (iOS Only): Make the content ready to play, but don't actually commence playback.
- "begin seeking forward" (iOS Only): Start seeking forward through the content of the player.
- "begin seeking backward" (iOS Only): Start seeking backward through the content of the player.
- "end seeking" (iOS Only): Stop seeking through the content of the player.
- "snapshot | snapshot exactly, time, [ maxWidth, maxHeight ]" (iOS Only): Take a snapshot of the movie at time milliseconds from the beginning. If the 'exactly' form is specified the frame produced is as close as possible to time, otherwise the nearest keyframe is used. The snapshot is made available as a new image object cloned from the templateImage, with data in the format as specified by the global paintCompression property. Takes the following additional parameters:
	- "time": The milliseconds from the beginning.
	- "maxWidth (optional)": If maxWidth and maxHeight are specified, the snapshot is scaled to fit within a rectangle	of that size but preserving the frame's aspect ratio.
	- "maxHeight (optional)": If maxWidth and maxHeight are specified, the snapshot is scaled to fit within a rectangle of that size but preserving the frame's aspect ratio.
- "focus": Focus on the control. On iOS this will also display the keyboard.
- "focus": Focus on the control. On iOS this will also display the keyboard.
- "scrollRangeToVisible rangeStart, rangeLength": Ensures the given text range is visible in the view by changing the scroll of the field.
	- "rangeStart": The start index of the text that is to be made visible.
	- "rangeLength": The length of the text that is to be made visible.

Description:
Use the <mobileControlDo> command to execute behaviors specific to a particular native mobile control created using <mobileControlCreate>. An action may require or have a number of optional extra parameters which are defined in the values section below.

References: mobileControlCreate (command), mobileControlDelete (command), mobileControlSet (command), mobileControlGet (function), mobileControlTarget (function), mobileControls (function)
