      */
     override public function set text(value:String):void
     {
-        // Setting 'text' temporarily causes 'content' to become null.
-        // Later, after the 'text' has been committed into the TextFlow,
-        // getting 'content' will return the TextFlow.
-        _content = null;
-        contentChanged = false;
-        textInvalid = false;
-        
-        super.text = value;
-    }
+    	// Treat setting the 'text' to null
+    	// as if it were set to the empty String
+    	// (which is the default state).
+    	if (value == null)
+    		value = "";
+    	
+    	// Don't return early if value is the same as _text,
+    	// because _text might have been produced from setting
+    	// 'textFlow' or 'content'.
+    	// For example, if you set a TextFlow corresponding to
+    	// "Hello <span color="OxFF0000">World</span>"
+    	// and then get the 'text', it will be the String "Hello World"
+    	// But if you then set the 'text' to "Hello World"
+    	// this represents a change: the "World" should no longer be red.
+    	
+    	_text = value;
+    	textChanged = true;
+    	
+    	// If more than one of 'text', 'textFlow', and 'content' is set,
+    	// the last one set wins.
+    	textFlowChanged = false;
+    	contentChanged = false;
+    	
+		// The other two are now invalid and must be recalculated when needed.
+		_textFlow = null;
+    	_content = null;
+    	
+    	factory = staticStringFactory;
+    	
+		invalidateTextLines();
+		invalidateProperties();
+		invalidateSize();
+		invalidateDisplayList();
+	}
     
     //--------------------------------------------------------------------------
     //

        return _embeddedFontRegistry;
    }

    //--------------------------------------------------------------------------
    //
    //  Constructor


    //--------------------------------------------------------------------------
    //
    //  Class variables
    //
    //--------------------------------------------------------------------------

    /**
     *  @private
     */
    private static var classInitialized:Boolean = false;
    
	/**
	 *  @private
	 *  This TLF object composes TextLines from a text String.
	 *  We use it when the 'text' property is set to a String
	 *  that doesn't contain linebreaks.
	 */
	private static var staticStringFactory:StringTextLineFactory;
	
	/**
	 *  @private
	 *  This TLF object composes TextLines from a TextFlow.
	 *  We use it when the 'textFlow' or 'content' property is set,
	 *  and when the 'text' property is set to a String
	 *  that contains linebreaks (and therefore is interpreted
	 *  as multiple paragraphs).
	 */
	private static var staticTextFlowFactory:TextFlowTextLineFactory;
	
	/**
	 *  @private
	 *  This TLF object is used to import a 'text' String
	 *  containing linebreaks to create a multiparagraph TextFlow.
	 */
	private static var staticPlainTextImporter:ITextImporter;
	
	/**
	 *  @private
	 *  This TLF object is used to export a TextFlow as plain 'text',
	 *  by walking the leaf FlowElements in the TextFlow.
	 */
	private static var staticPlainTextExporter:ITextExporter;
	
	/**
     *  @private
     *  Used for determining whitespace processing when setting 'content'.
     */
    private static var staticTextLayoutFormat:TextLayoutFormat;
    
    /**
     *  @private
     *  Used for determining whitespace processing when setting 'content'.
     */
    private static var staticConfiguration:Configuration;
    
    /**
     *  @private
     *  Used to call isFontFaceEmbedded() in getEmbeddedFontContext().
     */
    private static var staticTextFormat:TextFormat;
    
	//--------------------------------------------------------------------------
    //
    //  Class properties
    //
