|
|
Make your own "Get & Share" buttonThe "Get & Share" button is the rectangular button that appears at the bottom, by default, of any widget registered with Clearspring. This button lets users invoke the in-widget sharing menu, so they can spread your widget across the web. You can make your own button to dynamically pop up the sharing menu. NOTE: Making your own Get & Share button is currently only supported for Flash widgets, though support for Javascript widgets is coming in the near future. Why make your own button?There are a few different reasons why you might want to customize the button:
How to make your own buttonDisable the default buttonTo make your own button, you'll first need to disable the default button. You can disable the button from within the widget console, by using the Make It -> Customize tool. Turn the option off, and your widget will be displayed without the Get & Share button underneath. Set up your own UI componentOnce the button is disabled, you'll just need to decide on which of your own UI triggers should invoke the in-widget sharing menu. This can be an existing control in your widget, or you can design a new button specifically for this purpose. Trigger the sharing menu programmaticallyOnce you have the UI element that will trigger the opening of the menu, you use the menu.show function of the in-widget services API to invoke the menu programmatically, like this: _level0.cs.menu.show(); // opens the sharing menu centered on the widgetThe simplest version of the call will place the menu in its default, centered position. You can also position it in a specific location, as well as open it to a specific sharing service, by passing additional arguments to the call. See the method documentation for all the details. |