4,328
社区成员
发帖
与我相关
我的任务
分享
<?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">
<fx:Script>
</fx:Script>
<s:states>
<s:State name="State1"/>
<s:State name="State2"/>
</s:states>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
</fx:Declarations>
<!--State1-->
<s:Button x="82" y="156" width="351" height="31" chromeColor="#8283A7" focusColor="#8283A7" includeIn="State1"/>
<s:Button styleName="button" id="show1" x="82" y="156" height="31" label="首页" chromeColor="#8283A7" includeIn="State1" focusColor="#393A68">
</s:Button>
<s:Button styleName="button" id="show2" x="150" y="156" height="31" label="数据管理 " chromeColor="#8283A7" includeIn="State1" focusColor="#393A68">
</s:Button>
<s:Button styleName="button" id="show3" x="218" y="156" height="31" label="账户管理" chromeColor="#8283A7" includeIn="State1" focusColor="#393A68">
</s:Button>
<s:RadioButton x="335" y="156" label="灰蓝" height="31" focusColor="#393A68" includeIn="State1" chromeColor="#8283A7"/>
<s:RadioButton x="380" y="156" label="灰绿" height="31" focusColor="#393A68" includeIn="State1" chromeColor="#8283A7"/>
<s:Button includeIn="State1" x="443" y="164" label="按钮"/>
<!--State2-->
<s:Button x="82" y="156" width="351" height="31" includeIn="State2" chromeColor="#344E3A" focusColor="#8DB897"/>
<s:Button styleName="button" id="show4" x="82" y="156" height="31" label="首页" includeIn="State2" chromeColor="#344E3A">
</s:Button>
<s:Button styleName="button" id="show5" x="150" y="156" height="31" label="数据管理 " includeIn="State2" chromeColor="#344E3A">
</s:Button>
<s:Button styleName="button" id="show6" x="218" y="156" height="31" label="账户管理" includeIn="State2" chromeColor="#344E3A">
</s:Button>
<s:RadioButton x="335" y="156" label="灰蓝" height="31" includeIn="State2" focusColor="#648B6D"/>
<s:RadioButton x="380" y="156" label="灰绿" height="31" includeIn="State2" focusColor="#648B6D"/>
</s:Application>
<?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">
<fx:Script>
<![CDATA[
protected function radioGroup_changeHandler(event:Event):void{
// TODO Auto-generated method stub
currentState = (event.target.selectedValue == "灰蓝") ? "State1" : "State2";
}
]]>
</fx:Script>
<s:states>
<s:State name="State1"/>
<s:State name="State2"/>
</s:states>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
<s:RadioButtonGroup id="radioGroup" change="radioGroup_changeHandler(event)" />
</fx:Declarations>
<!--State1-->
<s:Button x="82" y="156" width="351" height="31" chromeColor="#8283A7" focusColor="#8283A7" includeIn="State1"/>
<s:Button styleName="button" id="show1" x="82" y="156" height="31" label="首页" chromeColor="#8283A7" includeIn="State1" focusColor="#393A68">
</s:Button>
<s:Button styleName="button" id="show2" x="150" y="156" height="31" label="数据管理 " chromeColor="#8283A7" includeIn="State1" focusColor="#393A68">
</s:Button>
<s:Button styleName="button" id="show3" x="218" y="156" height="31" label="账户管理" chromeColor="#8283A7" includeIn="State1" focusColor="#393A68">
</s:Button>
<!-- s:RadioButton x="335" y="156" label="灰蓝" height="31" focusColor="#393A68" includeIn="State1" chromeColor="#8283A7"/>
<s:RadioButton x="380" y="156" label="灰绿" height="31" focusColor="#393A68" includeIn="State1" chromeColor="#8283A7"/>
<s:Button includeIn="State1" x="443" y="164" label="按钮"/ -->
<!--State2-->
<s:Button x="82" y="156" width="351" height="31" includeIn="State2" chromeColor="#344E3A" focusColor="#8DB897"/>
<s:Button styleName="button" id="show4" x="82" y="156" height="31" label="首页" includeIn="State2" chromeColor="#344E3A">
</s:Button>
<s:Button styleName="button" id="show5" x="150" y="156" height="31" label="数据管理 " includeIn="State2" chromeColor="#344E3A">
</s:Button>
<s:Button styleName="button" id="show6" x="218" y="156" height="31" label="账户管理" includeIn="State2" chromeColor="#344E3A">
</s:Button>
<s:RadioButton x="335" y="156" label="灰蓝" height="31" focusColor="#648B6D" group="{radioGroup}" selected="true" />
<s:RadioButton x="380" y="156" label="灰绿" height="31" focusColor="#648B6D" group="{radioGroup}" />
</s:Application>
<?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">
<fx:Script>
<![CDATA[
protected function myRad_changeHandler(event:Event):void
{
// TODO Auto-generated method stub
currentState = (currentState == event.currentTarget.selectedValue) ? '' : event.currentTarget.selectedValue;
trace(event);
}
]]>
</fx:Script>
<s:states>
<s:State name="State1"/>
<s:State name="State2"/>
</s:states>
<fx:Declarations>
<s:RadioButtonGroup id="myRad" change="myRad_changeHandler(event)"/>
</fx:Declarations>
<!--State1-->
<s:Button x="82" y="156" width="351" height="31" chromeColor="#8283A7" focusColor="#8283A7" includeIn="State1"/>
<s:Button styleName="button" id="show1" x="82" y="156" height="31" label="首页" chromeColor="#8283A7" includeIn="State1" focusColor="#393A68">
</s:Button>
<s:Button styleName="button" id="show2" x="150" y="156" height="31" label="数据管理 " chromeColor="#8283A7" includeIn="State1" focusColor="#393A68">
</s:Button>
<s:Button styleName="button" id="show3" x="218" y="156" height="31" label="账户管理" chromeColor="#8283A7" includeIn="State1" focusColor="#393A68">
</s:Button>
<s:RadioButton x="335" y="156" label="灰蓝" height="31" focusColor="#393A68" includeIn="State1" chromeColor="#8283A7" group="{myRad}" value="State1"/>
<s:RadioButton x="380" y="156" label="灰绿" height="31" focusColor="#393A68" includeIn="State1" chromeColor="#8283A7" group="{myRad}" value="State2"/>
<!--State2-->
<s:Button x="82" y="156" width="351" height="31" includeIn="State2" chromeColor="#344E3A" focusColor="#8DB897"/>
<s:Button styleName="button" id="show4" x="82" y="156" height="31" label="首页" includeIn="State2" chromeColor="#344E3A">
</s:Button>
<s:Button styleName="button" id="show5" x="150" y="156" height="31" label="数据管理 " includeIn="State2" chromeColor="#344E3A">
</s:Button>
<s:Button styleName="button" id="show6" x="218" y="156" height="31" label="账户管理" includeIn="State2" chromeColor="#344E3A">
</s:Button>
<s:RadioButton x="335" y="156" label="灰蓝" height="31" includeIn="State2" focusColor="#648B6D" group="{myRad}" value="State2"/>
<s:RadioButton x="380" y="156" label="灰绿" height="31" includeIn="State2" focusColor="#648B6D" group="{myRad}" value="State1"/>
</s:Application>
<?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">
<fx:Script>
<![CDATA[
protected function myRad_changeHandler(event:Event):void
{
// TODO Auto-generated method stub
currentState = (currentState == event.currentTarget.selectedValue) ? '' : event.currentTarget.selectedValue;
trace(event);
}
]]>
</fx:Script>
<s:states>
<s:State name="State1"/>
<s:State name="State2"/>
</s:states>
<fx:Declarations>
<s:RadioButtonGroup id="myRad" change="myRad_changeHandler(event)"/>
</fx:Declarations>
<!--State1-->
<s:Button x="82" y="156" width="351" height="31" chromeColor="#8283A7" focusColor="#8283A7" includeIn="State1"/>
<s:Button styleName="button" id="show1" x="82" y="156" height="31" label="首页" chromeColor="#8283A7" includeIn="State1" focusColor="#393A68">
</s:Button>
<s:Button styleName="button" id="show2" x="150" y="156" height="31" label="数据管理 " chromeColor="#8283A7" includeIn="State1" focusColor="#393A68">
</s:Button>
<s:Button styleName="button" id="show3" x="218" y="156" height="31" label="账户管理" chromeColor="#8283A7" includeIn="State1" focusColor="#393A68">
</s:Button>
<s:RadioButton x="335" y="156" label="灰蓝" height="31" focusColor="#393A68" includeIn="State1" chromeColor="#8283A7" group="{myRad}" value="State1"/>
<s:RadioButton x="380" y="156" label="灰绿" height="31" focusColor="#393A68" includeIn="State1" chromeColor="#8283A7" group="{myRad}" value="State2"/>
<s:Button includeIn="State1" x="443" y="164" label="按钮"/>
<!--State2-->
<s:Button x="82" y="156" width="351" height="31" includeIn="State2" chromeColor="#344E3A" focusColor="#8DB897"/>
<s:Button styleName="button" id="show4" x="82" y="156" height="31" label="首页" includeIn="State2" chromeColor="#344E3A">
</s:Button>
<s:Button styleName="button" id="show5" x="150" y="156" height="31" label="数据管理 " includeIn="State2" chromeColor="#344E3A">
</s:Button>
<s:Button styleName="button" id="show6" x="218" y="156" height="31" label="账户管理" includeIn="State2" chromeColor="#344E3A">
</s:Button>
<s:RadioButton x="335" y="156" label="灰蓝" height="31" includeIn="State2" focusColor="#648B6D" group="{myRad}" value="State1"/>
<s:RadioButton x="380" y="156" label="灰绿" height="31" includeIn="State2" focusColor="#648B6D" group="{myRad}" value="State2"/>
</s:Application>