Support

Flash Installation

Whether you have a web site built using Flash, or a component like a game or a video player, you can add AddThis sharing features to it. Note: If you are looking for information on sharing Flash content, rather than adding sharing into a Flash application, take a look at this tutorial.

Initiating sharing from a Flash object is as simple as sending the user's browser to the Sharing Endpoints via simple links or your own user interface elements.



Using the Sharing Endpoints

The AddThis Sharing Endpoints are a set of web endpoints that help the user share to various destinations. All you have to do to invoke them is send the user's browser to a well-defined URL, including the destination, the URL to share, and other optional parameters. If you aren't familiar with those endpoints, here's a quick primer:

To display a list of all services supported by AddThis, use the generic Sharing API endpoint (try it):

http://api.addthis.com/oexchange/0.8/offer?url=http%3A%2F%2Fwww.addthis.com

To share to a specific destination like Facebook, use the Sharing API endpoint for that service (try it):

http://api.addthis.com/oexchange/0.8/forward/facebook/offer?url=http%3A%2F%2Fwww.addthis.com

Take a look at the Sharing Endpoints documentation for all the details on the endpoints themselves.

 

Invoking the Endpoints from Flash

In Flash, sending the browser to a URL like this is easily done, depending on which ActionScript environment you are in.

In ActionScript 2:

getURL("http://api.addthis.com/oexchange/0.8/offer?url=
 	http%3A%2F%2Fwww.addthis.com","_blank");

Alternatively, in ActionScript 3:

var url:String = "http://api.addthis.com/oexchange/0.8/offer?url=
 	http%3A%2F%2Fwww.addthis.com"; var request:URLRequest = new URLRequest(url); 
try {
   navigateToURL(request, '_blank'); // second argument is target 
} catch (e:Error) {
   trace("Error occurred!"); 
} 

Remember also that the parameters need to be URL-encoded, as these are server-side calls.

Note that in both cases, you will be attaching this functionality to a button or control of your choice. This is intentional, as typically Flash user interfaces are so stylized that a generic UI isn't desireable. We do, however, provide example code, including a full menu, that you are free to use. Take a look at this page to get the code and an overview of the example code.

 

A Quick Example

Here's a simple video player that uses the sharing endpoints (get it from the Flash Examples page).


 

Note: This player also does a few other things, like sharing Flash content. Take a look at the Embedded Content example for more info.

Last Updated: Oct 25, 2013 04:41PM EDT
help@addthis.com
http://assets01.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete