             if (states[i].name == stateName)
                 return states[i];
         }
-
-        var message:String = resourceManager.getString(
-            "core", "stateUndefined", [ stateName ]);
-        throw new ArgumentError(message);
-
+        
+        if (throwOnUndefined)
+        {
+            var message:String = resourceManager.getString(
+                "core", "stateUndefined", [ stateName ]);
+            throw new ArgumentError(message);
+        }
         return null;
     }
 

     *  Returns the state with the specified name, or null if it doesn't exist.
     *  If multiple states have the same name the first one will be returned.
     */
    private function getState(stateName:String):State
    {
        if (!states || isBaseState(stateName))
            return null;

    }

    /**
     *  @inheritDoc 
     */
    public function hasState(stateName:String):Boolean
    {
        return (getState(stateName, false) != null); 
    }

    /**
     *  @private
     *  Returns true if the passed in state name is the 'base' state, which
     *  is currently defined as null or ""
