snippets / src/charts/NodeSkin.mxml

Language: Xml - First posted by sawantilak on 2008-05-21 19:05 (4 months, 3 weeks)
Link to the snippet: http://www.friendsnippets.org/snippet/312/

src/charts/NodeSkin.mxml

 1 <?xml version="1.0" encoding="utf-8"?>
2 <Degrafa:GraphicBorderSkin xmlns:mx="http://www.adobe.com/2006/mxml"
3 xmlns:Degrafa="http://www.degrafa.com/2007">
4
5 <mx:Script>
6 <![CDATA[
7 [Bindable]
8 private var awidth:Number=0;
9
10 [Bindable]
11 private var aheight:Number=0;
12
13 override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
14 super.updateDisplayList(unscaledWidth, unscaledHeight);
15 awidth = unscaledWidth;
16 aheight = unscaledHeight;
17 }
18 ]]>
19 </mx:Script>
20
21 <Degrafa:fills>
22 <Degrafa:RadialGradientFill id="MainFill" angle="90" >
23 <Degrafa:GradientStop ratio="0" alpha="1" color="#EE9819"/>
24 <Degrafa:GradientStop ratio="1" alpha="1" color="#FAE38F"/>
25 </Degrafa:RadialGradientFill>
26
27 <Degrafa:RadialGradientFill id="WashFill" angle="90" >
28 <Degrafa:GradientStop ratio="0" alpha=".75" color="#FFFFFF"/>
29 <Degrafa:GradientStop ratio="1" alpha="0" color="#FFFFFF"/>
30 </Degrafa:RadialGradientFill>
31 </Degrafa:fills>
32
33 <Degrafa:stroke>
34 <Degrafa:SolidStroke color="#EE9819" id="theStroke" />
35 </Degrafa:stroke>
36
37 <Degrafa:geometry>
38 <Degrafa:Circle centerX="{awidth/2}" centerY="{aheight/2}" radius="{Math.max(awidth/2,aheight/2)}"
39 fill="{MainFill}" stroke="{theStroke}" />
40
41 <Degrafa:Ellipse width="{awidth-7}" height="{aheight/1.5}" x="3" y="3"
42 fill="{WashFill}" />
43 </Degrafa:geometry>
44
45 </Degrafa:GraphicBorderSkin>
In order to post a comment, you should have a friendsnippet account. Please sign-in.

0 comments

May '08