             }
         }
         
-        private function apply(s:State):void
+        private function apply(oldState:State, s:State):void
         {
             var arr:Array = s.overrides;
             for each (var o:Object in arr)

                doc.dispatchEvent(new Event("stateChangeComplete"));
            }
        }
            
        private function revert(s:State):void
        {
            var arr:Array = s.overrides;
            for each (var o:Object in arr)
            {
                if (o is AddItems)
                {
                    var ai:AddItems = AddItems(o);
                    for each (var item:IChild in ai.items)
                    {
                        var parent:IParent = item.parent as IParent;
                        parent.removeElement(item);
                    }
                    if (parent is IContainer)
                        IContainer(parent).childrenAdded();
                }
                else if (o is SetProperty)

    import org.apache.flex.events.EventDispatcher;
    import org.apache.flex.events.IEventDispatcher;
    import org.apache.flex.events.ValueChangeEvent;
    import org.apache.flex.states.AddItems;
    import org.apache.flex.states.SetEventHandler;
    import org.apache.flex.states.SetProperty;
    import org.apache.flex.states.State;
    import org.apache.flex.states.Transition;
    import org.apache.flex.utils.MXMLDataInterpreter;
	
