BCS AddThis MXML Component

The simplest way to include AddThis functionality in all Flash Builder pages is to install this component and use it on every page that you desire to share with social web services.

<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
		 xmlns:s="library://ns.adobe.com/flex/spark"
		 xmlns:mx="library://ns.adobe.com/flex/mx" width="127" height="18">
 
	<fx:Script>
		<![CDATA[
			[bindable]
			public var Title:String;
 
			[bindable]
			public var URL:String;
 
			[bindable]
			protected function image1_clickHandler(event:MouseEvent):void
			{
				var urlReq:URLRequest = new URLRequest("http://api.addthis.com/oexchange/0.8/offer");
				var variables:URLVariables = new URLVariables();
				variables.url = URL;
				variables.title = Title;
				variables.description = "This web site is for assisting technicians in ther technology endeavors";
			    variables.user = "description";
 
				urlReq.data = variables;
 
				navigateToURL(urlReq, "_blank");
 
			}
		]]>
	</fx:Script>
 
	<fx:Declarations>
		<!-- Place non-visual elements (e.g., services, value objects) here -->
	</fx:Declarations>
	<mx:Image x="0" y="0" width="125" height="16" source="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" click="image1_clickHandler(event)"/>
</s:Group>

Leave a Reply