State and Effect demo,状态和效果简单示例

from:Flex与ActionScript3.0程序开发

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600" width="467" height="486">

	<mx:transitions>

		<mx:Transition fromState="*" toState="*">

			<mx:Parallel targets="{[panel1,panel2,panel3]}">

				<mx:Resize>

				</mx:Resize>

				<mx:Move>

				</mx:Move>

			</mx:Parallel>

		</mx:Transition>

	</mx:transitions>

	<mx:states>

		<mx:State name="state02">

			<mx:SetProperty target="{panel1}" name="width" value="143"/>

			<mx:SetProperty target="{panel1}" name="height" value="143"/>

			<mx:SetProperty target="{panel1}" name="x" value="54"/>

			<mx:SetProperty target="{panel1}" name="y" value="333"/>

			<mx:SetProperty target="{panel2}" name="x" value="10"/>

			<mx:SetProperty target="{panel2}" name="y" value="10"/>

			<mx:SetProperty target="{panel2}" name="width" value="447"/>

			<mx:SetProperty target="{panel2}" name="height" value="300"/>

		</mx:State>

		<mx:State name="state03">

			<mx:SetProperty target="{panel1}" name="width" value="143"/>

			<mx:SetProperty target="{panel1}" name="height" value="143"/>

			<mx:SetProperty target="{panel1}" name="x" value="54"/>

			<mx:SetProperty target="{panel1}" name="y" value="333"/>

			

			

			<mx:SetProperty target="{panel3}" name="x" value="10"/>

			<mx:SetProperty target="{panel3}" name="y" value="10"/>			

			<mx:SetProperty target="{panel3}" name="width" value="447"/>

			<mx:SetProperty target="{panel3}" name="height" value="300"/>

			

			<mx:SetProperty target="{panel2}" name="x" value="274"/>

			<mx:SetProperty target="{panel2}" name="y" value="333"/>

			

		</mx:State>

	</mx:states>

	<mx:Panel x="10" y="10" width="447" height="300" layout="absolute" title="panel1" id="panel1" click="this.currentState='';">

	</mx:Panel>

	<mx:Panel x="54" y="333" width="143" height="143" layout="absolute" title="panel2" id="panel2" click="this.currentState='state02';">

	</mx:Panel>

	<mx:Panel x="274" y="333" width="143" height="143" layout="absolute" title="panel3" id="panel3" click="this.currentState='state03';">

	</mx:Panel>

	

</mx:Application>

你可能感兴趣的:(effect)