Àí½â flex component
component¾ÍÊÇÒ»¸öAS class »òÕßÊÇMXML componentÎļþÔÚmanifestÎļþÖÐÓ³ÉäµÄ±êÇ©.·Ö¿ÉÊӺͲ»¿ÉÊÓ
¿ÉÊÓ»¯component°üÀ¨Containers ºÍ UI controls
Containers(Appliction, Panel...)
UI controls(Button, Label)
¿ÉÒÔͨ¹ý3ÖÖ·½Ê½ÉèÖÃcomponentµÄÊôÐÔ
1.tag attributers
Java´úÂë
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
</mx:Application>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
</mx:Application>
ÖеÄlayout="absolute"
2.nested tags
Java´úÂë
<mx:Button id="exampleButton">
<mx:label>Example Button</mx:label>
</mx:Button>
<mx:Button id="exampleButton">
<mx:label>Example Button</mx:label>
</mx:Button>
¸üµäÐ͵ÄÓ¦ÓÃ
Java´úÂë
<mx:ComboBox id="exampleComboBox">
<mx:dataProvider>
<mx:ArrayCollection>
<mx:String>A</mx:String>
<mx:String>B</mx:String>
<mx:String>C</mx:String>
<mx:String>D</mx:String>
</mx:ArrayCollection>
</mx:dataProvider>
</mx:ComboBox>
<mx:ComboBox id="exampleComboBox">
<mx:dataProvider>
<mx:ArrayCollection>
<mx:String>A</mx:String>
<mx:String>B</mx:String>
<mx:String>C</mx:String>
<mx:String>D</mx:String>
</mx:ArrayCollection>
</mx:dataProvider>
</mx:ComboBox>
3.AS ;)
¼¸ºõËùÓеÄcomponent(ËùÓеĿÉÊÓ»¯component)¶¼ÓÐidÊôÐÔ...(Âð¶«¶«Ã»ÓÐÄØ?),id ÓÉÊý×Ö
Ïà¹ØÎĵµ£º
ʹÓÃÄÚÁªº¯Êý
private function ABCButtonListener(e:MouseEvent,specialObj:Object): void
{
Alert.show(specialObj.name);
}
private function methodWhereyouDostuffAndRegisterListener(): void
{
var myPrivateSpecialObject:Object = {name:"Special String Ingredients for Orange"};
......
ÓõÄÊÇCommonsÉÏ´«×é¼þ£¬ÏÂÔØµØÖ·£ºCommons
ÍøÉÏÕÒµÄСÀý×Ӹĵģ¬ÐÞ¸ÄÁ˲¿·Ö´íÎó¡£
1£¬FileUpload.java
package com.fileupload;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.charset.Charset;
import java.util.Iterator;
import java.util.List;
import ja ......
Application×é¼þÑùʽÊôÐÔ
backgroundImage ±³¾°Í¼ ʹÓÃEmbed(source=" ");À´Ó¦ÓÃ
& ......
µ±ArrayµÄÊý¾Ý·¢Éú±ä»¯µÄʱºò£¬ÓÃËü×÷ΪÊý¾ÝÔ´µÄ¿Ø¼þ²»ÄܸÐÖªÕâÖֱ仯¡£
ÀýÈ磺myArray.push("new value"); Õâʱ£¬Èç¹ûÒ»¸öListÓÃËü×÷ΪdataProvider£¬ListµÄÁбíÖв»»áÔö¼ÓмÓÈëµÄÕâ¸öÖµ¡£
¶øµ±ArrayCollectionµÄÊý¾Ý·¢Éú±ä»¯µÄʱºò£¬Äܹ»Í¨Öª¿Ø¼þ·¢Éú±ä»¯¡£
ÀýÈ磺myArrayCollection.addItem("new item"); Õâʱ£¬È ......
½ñÌìÓÃFlexÓïÑÔдÁ˸ö¼ì²é·Ç·¨×Ö·û£¬ºÍÊý×ֵķ½·¨£¬¹²´ó¼Ò½»Á÷
ÉÔ΢¸ÄһϾÍÄÜÓõ½.NET»òJavaÓïÑÔÖÐ
public class CheckString
{
//ÅжÏÓû§ÊÇ·ñÊäÈë·Ç·¨×Ö·û
public static function CheckStr(strValue:String):Boolean
{
......