Creating a recessed line in MXML

I’ve been trying to get a recessed line type of look with MXML and since it took a while I’m posting it here. It can be improved so please post any updates.

	<s:Line width="100%" top="98" left="10" right="10">
		<s:stroke>
			<s:SolidColorStroke color="#555555" weight="1" caps="none"/>
		</s:stroke>
		<s:filters>
			
			<s:BevelFilter angle="45" 
						   type="outer"
						   distance="1" 
						   knockout="true"
						   highlightColor="#000000" 
						   highlightAlpha=".5"
						   shadowColor="#ffffff"
						   shadowAlpha=".5"
						   blurX="3"
						   blurY="3"
						   />
			
		</s:filters>
	</s:Line>

I think the look I’m trying to go for is the horizontal rule in Visual Studio type GUI.

Here’s a slightly sharper alternative setting:

<s:BevelFilter angle="45" 
						   type="outer"
						   distance="1" 
						   knockout="true"
						   highlightColor="#000000" 
						   highlightAlpha=".5"
						   shadowColor="#ffffff"
						   shadowAlpha=".5"
						   blurX="0"
						   blurY="0"
						   />
This entry was posted in Flex. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Wrap your code before posting! Click the links below:

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="">