18.02.2015 Views

5ml User's Guide

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>5ml</strong> <strong>User's</strong> <strong>Guide</strong><br />

Action Description Element/SDK Required<br />

Set Text<br />

Share on Facebook<br />

Show<br />

Replaces the text that appears on a text-based element with new text<br />

that is defined along with this action. (For the Text Input, Text Area,<br />

and Password Input elements this action replaces the text in the<br />

Prompt Text field. For the Button and Label elements this action<br />

replaces the text in the Text field. For the Text element this action<br />

replaces all the text entered into the HTML Editor.<br />

Opens a browser window with the Facebook Share this link page and<br />

the defined link to share.<br />

Shows a hidden page element. Use in combination with the Hide<br />

action.<br />

Text, Label, Text Area, Text Input,<br />

Button, and Password Input.<br />

Show Current Location Causes the current location to display on the Map View element. Map View<br />

Show Next View Shows the next view in a View Set element. View Set<br />

Show Page<br />

Shows the selected page, with selected transition effect and time.<br />

Show Previous View Shows the previous view in a View Set element. View Set<br />

Show View Shows the defined view. View Set<br />

Stop Media Stops playing the selected media. Audio, Video<br />

Take a photo Takes a photo with the mobile device. SDK integration<br />

Turn Flashlight Off Turns the mobile device's flashlight off. SDK integration<br />

Turn Flashlight On Turns the mobile device's flashlight on. SDK integration<br />

Twitter Post<br />

Opens a browser window with the Twitter What's Happening page and<br />

the defined Tweet Text and the account to follow.<br />

Vibrate Device Vibrates the mobile device. SDK<br />

Using the <strong>5ml</strong> Proxy API<br />

This section describes the <strong>5ml</strong> Proxy API and provides example implementations. Using the <strong>5ml</strong> Proxy API, the <strong>5ml</strong><br />

developer can access any kind of remote web service, through a GET or POST HTTP request. Because some public web<br />

services do not allow AJAX calls from third-party sites to access the web service, <strong>5ml</strong> uses a proxy to access the web<br />

service. When you export a project, <strong>5ml</strong> provides a proxy.php script in the project package, which you can use to handle<br />

the proxy request, provided the web server hosting the project supports PHP.<br />

You can write custom code to obtain data from a <strong>5ml</strong> widget's attributes to pass to the web service using the <strong>5ml</strong> Proxy<br />

API. Similarly you can write custom code to obtain data from a web service and insert it into a <strong>5ml</strong> widget's attributes. For<br />

example, the mobile device user enters the zip code value "94111" into a entry form and clicks on a button to retrieve a<br />

list of local concerts from a web service. The user clicks on a button to retrieve the price for a ticket. The web service<br />

sends the price, for example, "$20," and the price is passed to a button widget's caption attribute. The user sees the<br />

button rendered with the "$20" value.<br />

- 227 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!