|
|
Reference In-Widget Share Menu (Flash)About this ExampleThis viral sharing menu is a full-featured reference implementation, built on top of the Share features of the In-Widget Services API. You can use it as-is to easily add sharing services to your widget. Or, you can use the code as an advanced example of using the lower-level APIs directly.
NOTE: This menu is under active development. URLs and parameter names may change unexpectedly pre-release.
The Menu In ActionThis is the default mode of the menu; it's 410px x 210px and the theme color is grey.
Loading the Menu into your WidgetTo load the menu in your widget, just use a standard Flash loadMovie technique, passing configuration parameters on the URL. Generally, you will load the Clearspring Kernel into your application, then load the menu, telling it the location of the kernel via the kernelPath argument. Alternatively, you can have the menu load against a pre-registered widget and load the Kernel automatically for you, by specifying your widget's Widget Id as the WID argument.Loading the menu in ActionScript 2Be sure to set _lockroot to true when loading the menu; otherwise, just use a simple LoadMovie call (or one of its variants):this.createEmptyMovieClip("menu_mc", 999);
Note that this example uses the WID method.
You can download a simple Flash CS3 example of a widget that loads the kernel first, and also does some positioning of the menu. Download Now
Loading the menu in ActionScript 3Support for AS3 coming soon...Controlling the Menu's AppearanceThe menu can be configured with a variety of options to fully control its appearance and functionality. You can change its color scheme, its layout, the share services it makes available, and more. Here are a few examples:Here is a skinnier version. It's 160px x 310px and the theme color is white. This is all done with simple parameters: ?themeColor=white&menuWidth=160&menuHeight=300
In this example, labeled buttons have been replaced with icons for a smaller form factor, and the theme is black. ?themeColor=black&menuWidth=260&menuHeight=210&noText=true
The smallest possible menu, in blue. ?themeColor=blue&menuWidth=160&menuHeight=210
Menu Configuration OptionsAll of the available configuration options, passed as URL parameters (or FlashVars) when loading the menu, are listed here:
|