     //
     //--------------------------------------------------------------------------
 
+	protected function handleStyleEventComplete( event : StyleEvent ) : void
+	{
+		__styleNameChanged = true;
+		
+		invalidateProperties();
+	}
+
     /**
      *  Added to adhere to the framework lifecycle naming convention. Just calls 
      *  commitProperties().

    {
        super();
        
    }
    


            cssStyleDeclaration = StyleManager.getStyleDeclaration( "." + styleName );
        }
        
        if ( cssStyleDeclaration == null )
        {
        	var qualClassName : String = null;
        	if ( target != null )
        	{
	        	qualClassName = getQualifiedClassName( target ).split( "::" ).join( "." );
				cssStyleDeclaration = StyleManager.getStyleDeclaration( 
											qualClassName + 
									   	    ( styleName.charAt( 0 ) == "." ? "" : "." ) + 
									   	    styleName 
								   	  );
			}
			
			if ( targets != null && cssStyleDeclaration == null )
			{
				for each ( var target : Object in targets )
				{
		        	qualClassName = getQualifiedClassName( target ).split( "::" ).join( "." );
					cssStyleDeclaration = StyleManager.getStyleDeclaration( 
												qualClassName + 
										   	    ( styleName.charAt( 0 ) == "." ? "" : "." ) + 
										   	    styleName 
									   	  );
									   	  
					if ( cssStyleDeclaration != null ) break;
				}
			}
        }
        
		var pseudoName : String = null;
		for each ( var selector : String in StyleManager.selectors )
		{
			pseudoName = null;
			
			//  Flex 4
			if ( selector.indexOf( styleName + ":" ) != -1  )
			{
				pseudoName = selector.split( ":" )[ 1 ];
				if ( __pseudoSelectors[ pseudoName ] == null ) __pseudoSelectors[ pseudoName ] = [];	
				__pseudoSelectors[ pseudoName ].push( StyleManager.getStyleDeclaration( selector ) );
			}
			
			// Flex 3
			else if ( selector.indexOf( styleName ) != -1 )
			{
				pseudoName = selector.substr( selector.indexOf( styleName ) + styleName.length );
				pseudoName = pseudoName.toLowerCase();
			}
			
			if ( pseudoName != null )
			{
				if ( __pseudoSelectors[ pseudoName ] == null ) __pseudoSelectors[ pseudoName ] = [];	
				__pseudoSelectors[ pseudoName ].push( StyleManager.getStyleDeclaration( selector ) );
			}
		}
        
        return cssStyleDeclaration;
    }

    /**
     *  @protected
     * 
     *  Builds the dictionaries that map the aggregate selectors and pseudo selectors
     */
    protected function buildAggregateMappings() : void
    {
    	__aggregateStyles = createAggregateMapping( __cssStyleDeclarations );

    	__aggregatePseudoMappings = new Dictionary();
    	
    	var mapping : Dictionary = null;
    	for ( var key : String in __pseudoSelectors )
    	{
    		mapping = createAggregateMapping( __pseudoSelectors[ key ] as Array );
    		__aggregatePseudoMappings[ key ] =  mapping;
    	}
    	
    	return;
    }
    
    /**
     *  @protected
     * 
     *  Aggregates a set of CSSStyleDeclarations into a dictionary mapping
     */
    protected function createAggregateMapping( cssStyleDeclarations : Array ) : Dictionary 
    {
    	var styles : Array = null;
    	var mapping : Dictionary = new Dictionary();
    	
    	for each ( var styleDec : CSSStyleDeclaration in cssStyleDeclarations )
    	{
    		styles = getStyles( styleDec );
    		for each ( var style : String in styles )
    		{
    			mapping[ style ] = styleDec.getStyle( style );
    		}
    	}
    	
    	return mapping;
    }
    
    /**
