级联方式-演示效果

<?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>
		
	</fx:Declarations>
	<!--mxml和actionscript代码级联方式效果-->
	<fx:Script>
		<![CDATA[
			import mx.controls.Alert;//
			
			private function Show():void{//创建函数,单击按钮时调用
				
			Alert.show('欢迎来到Flex的世界!','提示');
			
			}
			
		]]>
	</fx:Script>
	<s:Button id="btn1" x="300" y="40" label="单击提示" fontSize="20" 
			  width="180" height="25" color="red" 
			  click="Show()"
			  >
	</s:Button>
	

</s:Application>

你可能感兴趣的:(级联)