    package com.bluefire.flexDemo.command
    {
        import com.adobe.cairngorm.commands.Command;
        import com.adobe.cairngorm.control.CairngormEvent;
        import com.adobe.cairngorm.view.ViewLocator;
        import com.bluefire.flexDemo.events.MenuBtnClickEvent;
        import com.adobe.cairngorm.view.ViewLocator;
        import com.bluefire.flexDemo.view.MainViewHelper;
        import com.bluefire.flexDemo.model.DemoModelLocator;

        //in the newer versions of Cairngorm, the interface is ICommand
        public class MenuBtnClickCommand implements Command
        {
            public function execute(e:CairngormEvent):void
            {
                trace("menu click " + MenuBtnClickEvent(e).whichButton);
                if(MenuBtnClickEvent(e).whichButton.indexOf("presentation") > -1)
                    DemoModelLocator.getInstance().demo.view = "presentation";
                else if(MenuBtnClickEvent(e).whichButton.indexOf("code") > -1)
                    DemoModelLocator.getInstance().demo.view = "code";
                else if(MenuBtnClickEvent(e).whichButton.indexOf("blog") > -1)
                    DemoModelLocator.getInstance().demo.view = "blog";
            }
        }
    }