Flex4 模拟背景图片切换

前端之家收集整理的这篇文章主要介绍了Flex4 模拟背景图片切换前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<?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" height="100%" width="100%">     <fx:Declarations>         <!-- Place non-visual elements (e.g.,services,value objects) here -->     </fx:Declarations>     <fx:Script>         <![CDATA[                     ]]>     </fx:Script>     <s:ComboBox id="conBox" selectedItem="normal">         <s:dataProvider>             <s:ArrayCollection>                 <fx:String>error.png</fx:String>                 <fx:String>sorry.jpg</fx:String>             </s:ArrayCollection>         </s:dataProvider>     </s:ComboBox>         <s:Graphic x="20" y="20" width="100%" height="90%" top="50">         <mx:Image id="bg2" source="{conBox.selectedItem}" width="100%" height="100%" />     </s:Graphic>         <s:Button label="测试按钮" x="200" y="200"/>     <s:TextInput width="300" x="350" y="200"/>         </s:Application>

猜你在找的Flex相关文章