         return !stateName || stateName == "";
     }
 
+    /**
+     *  @private
+     *  Returns the default state. For Flex 4 and later we return the base
+     *  the first defined state, otherwise (Flex 3 and earlier), we return
+     *  the base (null) state.
+     */
+    private function getDefaultState():String
+    {
+        return (this is IStateClient2 && (states.length > 0)) ? states[0].name : null;
+    }
+    
     /**
      *  @private
      *  Commit a pending current state change.

     *  Transition effect currently playing.
     */
    private var _currentTransitionEffect:IEffect;

    [Inspectable(arrayType="mx.states.Transition")]
    [ArrayElementType("mx.states.Transition")]

    /**
     *  An Array of Transition objects, where each Transition object defines a
     *  set of effects to play when a view state change occurs.
     *
     *  @see mx.states.Transition
     */
    public var transitions:Array /* of Transition */ = [];

    //--------------------------------------------------------------------------
    //
    //  Properties: Other

            if (!indices)
            {
                parentDocument[id] = this;
                
                // TODO: Determine if we want "idAssigned" to be an event or
                // callback function. If this is changed, it alse needs to be
                // updated in:
                // modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.java
                var e:PropertyChangeEvent = new PropertyChangeEvent("idAssigned");
                e.source = parentDocument;
                e.property = id;
                e.oldValue = null;
                e.newValue = this;
                parentDocument.dispatchEvent(e);
            }
            else
            {
