flash on 2011-8-18
♥2 |
Line 31 |
Modified 2011-08-18 22:40:19 |
MIT License
archived:2017-03-04 15:22:33
ActionScript3 source code
/**
* Copyright cdubois75 ( http://wonderfl.net/user/cdubois75 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/wsN4
*/
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<s:SolidColorStroke id="defaultStroke" color="{NormColor}" weight="2" alpha="0.6"/>
<s:SolidColor id="defaultFill" color="{NormColor}" alpha="0.5"/>
<s:SolidColor id="hiLiteFill" color="{OverColor}" alpha="0.5"/>
</fx:Declarations>
<fx:Script>
<![CDATA[
[Bindable] private var NormColor: int = 0xFF00FF;
[Bindable] private var OverColor: int = 0x55FF55;
private var svgPath:String = "M6.115,27.036L0,18l6.115-8.98v5.972c5.896,0,8.856-2.986,8.856-9.109H 9.051L18,0l8.966,5.883"+
"h-5.972c0,6.123,2.986,9.109,9.059,9.109V9.02L36,18l-5.947,9.036v-6.07 2c-6.072,0-9.059,3.036-9.059,9.159h5.972L18," +
"36l-9.152-5.877h6.124c0-6.123-3.062-9.159-8.856-9.159V27.036z";
protected function button1_clickHandler(event:MouseEvent):void
{
svg.data = svgPath;
}
protected function group1_mouseOverHandler(event:MouseEvent):void
{
svg.fill = hiLiteFill;
}
]]>
</fx:Script>
<s:Group x="111" y="93" width="109" height="94" mouseEnabledWhereTransparent="false" mouseOver="svg.fill = hiLiteFill" mouseOut="svg.fill = defaultFill">
<s:Path id="svg" top="0" left="0" bottom="0" right="0" fill="{defaultFill}" stroke="{defaultStroke}"/>
</s:Group>
<s:Button x="111" y="41" label="Button" click="button1_clickHandler(event)"/>
</s:Application>