John All you need to do is call a line like this:ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_RUN, id));
Where "id" is the sequential numerical id number that is given to your widget when it is loaded. You can guess (trial and error) to find this number or you can add the code below to the ViewerContainer.mxml to find the id for you from the widgets label string.
//add this public var
public var _configData:ConfigData;
//Add this line to the postConfigHandler function
_configData = event.data as ConfigData;
//Add this new function
public function getWidgetId(widgetLabel:String):Number
{
var id:Number;
for (var i:Number = 0; i < _configData.widgets.length; i++)
{
if (_configData.widgets.label == widgetLabel)
id = _configData.widgets.id;
}
return id;
If you choose to add this code then you would use this line instead to open your widget:ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_RUN, ViewerContainer.getWidgetId("TheLabelOfYourWidget")));