Robert,
Thanks for the additional information. I have been playing with this and still cannot get it to work. The code below works fine for the closing of the widget, but the opening still does not work even when I dispatch the WIDGET_RUN event. Do you have any other suggestions? Any additional help that you might be able to provide would be appreciated. Thanks.
Kevin
// Checkbox definition:
<mx:CheckBox id="showZoomSlider" selected="true" click="showZoomSlider_clickHandler(event)" />
// Checkbox event handler:
protected function showZoomSlider_clickHandler(event:MouseEvent):void
{
if( showZoomSlider.selected )
{
var oId:Number = ViewerContainer.getInstance().widgetManager.getWidgetId("Navigation",true);
AppEvent.dispatch(AppEvent.WIDGET_RUN, oId);
Alert.show( oId.toString()); //Shows the widgetid of 1000
}
else
{
var cId:Number = ViewerContainer.getInstance().widgetManager.getWidgetId("Navigation",true);
var data:Object = {
id: cId,
state: WidgetStates.WIDGET_CLOSED}
AppEvent.dispatch(AppEvent.WIDGET_STATE_CHANGED, data);
}
}