Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

[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 ʵÏÖÊó±êÊÖÊÆ ÎÞÂë );

ÉùÃ÷£º×Ô¼ºÏëµÄ¡¢Ð´µÄ¶«Î÷£¬×ªÔØÇë×¢Ã÷³ö´¦£» ²»ÒªÏòÎÒÒª´úÂ룻 from CSDN ID: wander000
Ä¿µÄ£ºÔÚ×öС³ÌÐòʱ£¬ÏÔʾһЩÖØÒªµÄÊý¾ÝÈçÕʺÅÃÜÂëµÈ£¬²»ÏëÈñðÈËÖ±½Ó¿´µ½£¬ÔÚÖ¸¶¨×é¼þÉÏ°´¹æ¶¨ºÃµÄ¹ì¼£»Î¶¯Êó±ê²ÅÏÔʾ¡£
ÎÊÌ⣺һ¡¢Ö±½Ó´ò¿ªÊý¾Ý¿â²»¾Í¿´µ½Ã÷ÂëÁË£¿¶þ¡¢ÔõôÅжÏÊó±ê¹ì¼£µÄÐÎ×´£¿
½â¾ö£ºÒ»¡¢Êý¾Ý¿â´æȡʱÓÃÉÏ¼Ó ......

flexµ÷ÓÃas2µÄswf

ÓÉÓÚavm°æ±¾µÄÎÊÌ⣬flex3ÎÞ·¨Ö±½Óµ÷ÓÃflash×öµÄswfÎļþ£¬ÅªÁËÒ»Ì죬×îºóÖÕÓÚÏëµ½ÁËÒ»¸ö°ì·¨£¬½«LocalConnectºÍflexµ÷ÓÃas3Á½ÖÖ·½Ê½ÔÜÔÚÁËÒ»Æð£¬ËãÊÇÔÝʱ°ÑÕâ¸öÎÊÌâ½â¾öÁË£¡
´æÆðÀ´£¬Áô×ÅÒÔºóÐÞ¸Ä
µÚÒ»²½£ºÓÃflash×öÒ»¸öas2µÄÎļþ
ÎÒÔÚÀïÃæÌí¼ÓÁËÒ»¸ö°´Å¥
ÔÚµÚһ֡дÏÂÃæµÄ´úÂë
mybtn.onRelease=function()
 {
......

FABridge½Ì³Ì(Flex+Ajax) 2

Ê×ÏÈÔÚ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"   
             ......

Flexµ¯³ö¶Ô»°¿òdemo


       flexµ¯³ö¶Ô»°¿òʾÀý³ÌÐò·ÖΪÁ½²¿·Ö£ºMain.mxmlºÍSimpleTitleWindowExample.mxml£¬ÆäÖÐMail.mxmlΪÖ÷³ÌÐòÎļþ£¬SimpleTitleWindowExample.mxmlΪ¶Ô»°¿òÎļþ£¬¿ÉÒÔͨ¹ýÐÞ¸ÄSimpleTitleWindowExample.mxmlÎļþÀ´Ð޸ĶԻ°¿òÉϵÄ×é¼þ¡£
Main.mxml
<?xml version="1.0" encoding="ut ......

FlexÁ½ÖÖµ¯³ö´°¿Ú

1. ×î¼òµ¥µÄ¾¯¸æ´°¿Ú
ÄãÐèÒªÏȵ¼ÈëAlertÀࣺ import mx.controls.Alert;
È»ºóÔÚÏëÒªµ¯³ö¾¯¸æµÄʱºòʹÓãº
Alert.show(“ÄãÈ·¶¨ÒªÍ˳öϵͳÂð?”,“È·ÈÏ”,Alert.YES|Alert.NO,null,logout)
²ÎÊý˵Ã÷£ºµÚÒ»¸ö²ÎÊýÊÇÒªÏÔʾµÄÎı¾£¬µÚ¶þ¸ö²ÎÊýÊÇ´°¿ÚµÄ±êÌ⣬ÕâÁ½¸ö²ÎÊýÊÇ×î¾­³£Óõġ£µÚÈý¸ö²ÎÊýÊÇ°´Å¥£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ