Bill, From the calling widget use this code once you determine the widgets Id NumberWidgets are assigned a sequential number as they are loaded in the ViewerSo if you have three widgets then your widgets id would be 0, 1, or 2SiteContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_MENU_CLICKED, false, false, 1));
I would normally suggest using a function that would return the widgets id number based off of the widgets label, but is sounds like you are wanting to keep things pretty simple.But if you are intrested then here is the code that needs to be added to your SiteContainer.mxml//Add this to the private declarations
private var configData:ConfigData;
//This goes in the SiteContainer Init function
//listen for the config data to be loaded
SiteContainer.addEventListener(AppEvent.CONFIG_LOADED, config);
//Add these functions any where
private function config(event:AppEvent):void
{
configData = event.data as ConfigData;
}
public function getWidgetId(widgetLabel:String):Number
{
var id:Number;
for (var i:Number = 0; i < configData.configWidgets.length; i++)
{
if (configData.configWidgets.label == widgetLabel)
id = configData.configWidgets.id;
}
return id;
}
//then you can use it like this in your code
var id:Number = SiteContainer.getInstance().getWidgetId("Identify");
SiteContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_MENU_CLICKED, false, false, id));