Flex 기초 조작

1885 단어 Flex

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"  creationComplete="application1_creationCompleteHandler()"
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
	<fx:Script>
		<![CDATA[
			import mx.collections.ArrayCollection;
			import mx.containers.Form;
			import mx.events.FlexEvent;
			
			protected function application1_creationCompleteHandler():void
			{
				// TODO Auto-generated method stub
				trace(1);
				var arr:Array = new Array();
				arr.push("A","B");
				trace(arr.length);
				trace(arr[1]);
				trace(arr);
				
				var arrCon:ArrayCollection = new ArrayCollection([{name:"name1",value:"value1"},{name:"name2",value:"value2"}]);
				trace(arrCon[0].name);
				
				var a:int = 3;
				for(var i:int=0;i<=a;i++){
					trace(i);
				}
				var arrStr:Array = new Array("aa","bb","cc");
				for(var ii:String in arrStr){
					trace(arrStr[ii]);
				}
				
				for each(var cc:String in arrStr){
					trace(cc);
				}
				
				var ic:Number = 0; 
				while (ic < 20) { 
					trace(ic); 
					ic += 3; 
				}
				var myVar:Number = 0; 
				do { 
					trace(myVar); 
					myVar++; 
				} 
				while (myVar < 5);
			}
			
		]]>
	</fx:Script>
	<fx:Declarations>
		<!--       (    、   )     -->
	</fx:Declarations>
</s:Application>

좋은 웹페이지 즐겨찾기