WidgetPublisher:ActionScript
Using ActionScript (AS3), it is possible to access the Javascript waJS library. This is particularly interesting for contextual functions.
waJS functions can be triggered from AS3 using the following method:
ret = ExternalInterface.call([Name Of waJS function]);
Standard functions in the waJS library are prefixed with "ldWidgetUid_", which is replaced by a unique id at runtime. The value of this prefix is sent as a FlashVar, so you can use the following approach if you need to trigger a function with a "ldWidgetUid_" prefix (for example ldWidgetUid_getPref):
var ldWidgetUid:String = LoaderInfo(this.root.loaderInfo).parameters.uid;ret = ExternalInterface.call(ldWidgetUid+"_getWidgetPref",prefname);
waJS functions are sometimes asynchronous, so you will need to use the ldWidgetUid_flashCallback function in waJS.