[Flex] First Flex AIR App
ÊÔÓÃÁËÒ»ÏÂFlex£¬´´½¨HelloWorldÓ¦ÓõÄ˳ÐòÈçÏ£º
1 ´´½¨Îļþ: HelloWorld-app.xml
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/1.5">
<id>com.kdevn.flex.HelloWorld</id>
<version>0.1</version>
<filename>HelloWorld</filename>
<initialWindow>
<content>HelloWorld.swf</content>
<visible>true</visible>
<systemChrome>none</systemChrome>
<width>400</width>
<height>200</height>
</initialWindow>
</application>
2. ´´½¨Îļþ: HelloWorld.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" title="HelloWorld">
<mx:Label text="Hello AIR" horizontalCenter="0" verticalCenter="0"/>
</mx:WindowedApplication>
3. ±àÒ루Éú³ÉHelloWorld.swfÎļþ£©
amxmlc HelloWorld.mxml
4. ²âÊÔ
adl HelloWorld-app.xml
ÔËÐÐЧ¹ûͼ
5. ´´½¨Ö¤Ê飨sampleCert.pfx£©
adt -certificate -cn SelfSined 1024-RSA sampleCert.pfx samplePassword
6. ´´½¨°²×°Îļþ£¨HelloWorld.air£©
adt -package -storetype pkcs12 -keystore sampleCert.pfx HelloWorld.air HelloWorld-app.xml HelloWorld.swf
7. ÔËÐа²×°Îļþ£¬°²×°HelloWorldÓ¦ÓÃ
HelloWorld.air
Ïà¹ØÎĵµ£º
flex ×°Ôضà¸ömodule³öÏÖ: Ç¿ÖÆת»»ÀàÐÍʧ°Ü,³öÏÖijЩÀ಻ÄÜת»»
ÀýÈ磺
ÎÞ·¨½« mx.managers::PopUpManagerImpl@7155ac1 ת»»Îª mx.managers.IPopUpManager¡£
½â¾ö·½·¨ÊÇÔÚApplication¼ÓÈëÒýÓÃ
1.
import
mx.managers.DragManager;
private
var dragManager : DragManager;
2. ......
ÒÔϽéÉܼ¸ÖÖ×îΪ³£¼ûºÍʵÓõÄFLEXÓëÏÖÓпª·¢ÓïÑÔͨÐŵķ½·¨£º
1.C#
2.PHP
3.JAVA
1.FlexÓëC#ͨÐÅ(.net¿ª·¢Öг£ÓÃ)
Flex¶Ë´úÂë:
public static function SendMessage(objXML:XML,objResultHandle:Function):void
{
var objHttpService:HTT ......
Ò».ͨ¹ýjs·ÃÎÊFlex×é¼þ
1.×¼±¸¹¤×÷¡£ÏȽ¨Á¢Flex¹¤³Ì :fademo£¬²¢·ÅÖÃÒ»¸öÎı¾¿ò:txtName¡£×öÍêºó´úÂëÓ¦¸ÃÀàËÆÓÚÕâ¸öÑù×Ó£º
view plaincopy to clipboardprint?
·········10······· ......
Ê×ÏÈÔÚfademo.mxmlÖÐÉùÃ÷Ò»¸öbutton£¬²¢Ìí¼ÓÒ»¸öbtnClick·½·¨£º
view plaincopy to clipboardprint?
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
......
2ÖÖ·½·¨£¬
Ò»£¬ÀûÓÃjs¶ÁÈ¡ð¤Ìù°æ£º
var content = clipboardData.getData("Text");
document.getElementById("${application}").getClipboardData(content);
¶þ£¬Ö±½Ó¸´ÖƵ½datagrid
ÔÚDataGridÖУ¬µ±°´ÏÂCtrl¼üʱ£¬ÎÒÃÇ´´½¨Ò»¸öÒþ²ØµÄÎı¾£¨TextField£©×é¼þ£¬²¢½«½¹µã¶¨Î»¸øËü£¬ÕâÑù£¬ÎÒÃǾͿÉÒÔ½ÓÊÜÈκÎͨ¹ýCtrl+VÕ ......