Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : flex

Flex ʵ¼ù——×Ô¶¨Òå×é¼þ¼°µ÷ÓÃ

     ÕâÒ»´ÎµÄFlex ʵ¼ù½«ÒªÊµÏÖÒÔϹ¦ÄÜ£º
     1¡¢×Ô¶¨ÒåÒ»¸ö¼òµ¥µÄ Flex ×é¼þ
     2¡¢´´½¨Ò»¸öIndex. mxml À´µ÷ÓøÃ×é¼þ
           1£©Óà as µ÷ÓÃ×é¼þ
           2£©Óà mx ±êÇ©µ÷ÓÃ×é¼þ
     Ê×ÏÈ´´½¨ÐÂÎļþ¼Ð£¨user£©À´±£´æËùÓÐ×Ô¶¨ÒåµÄ×é¼þ£¬ÕâÀïÎÒ½«Ð´´½¨µÄ×é¼þÃüÃûΪ£ºUserView.mxml
     ÔÚÖ÷Ŀ¼Ï´´½¨ Mxml Application£¬ÕâÀïÎÒ½«ËüÃüÃûΪ£ºIndex.mxml
     ¹¤³ÌÊÓͼΪ£º
   
      ÏÂÃ棬À´Íê³É×é¼þµÄÉè¼Æ£º
       ÔÚDesign ÊÓͼϽ«¿Ø¼þÍϵ½Panel ÉÏ£¬ÉèÖÃÆäÊôÐÔ
       ÏÂÃæÊÇÎÒµÄÉè¼Æ£º
       ´úÂë
        
     DesignÊÓͼ
  ½ÓÏÂÀ´£¬À´Íê³ÉÖ÷Ò³ÃæIndex.mxmlµÄÉè¼Æ
& ......

FlexÓëºǫ́½»»¥µÄ4ÖÖ·½·¨

Ò»¡¢HTTPService
³ÌÐò´úÂ룺
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initializeHandler(event)">
<mx:Script>
<!--[CDATA[
private function initializeHandler(event:Event):void {
countriesService.send();
}
private function changeHandler(event:Event):void {
statesService.send();
}
]]>
</mx:Script>
<!-- ÔØÈë´¿¾²Ì¬µÄxmlÊý¾Ý -->
<mx:HTTPService id="countriesService" url="http://www.rightactionscript.com/states/xml/countries.xml" />
<!-- ÔØÈëÓÉphpÉú³ÉµÄxmlÊý¾Ý -->
<mx:HTTPService id="statesService" url="http://www.rightactionscript.com/states/xml/states.php">
<!-- ÒÔϱêÇ©¾ÍÊÇÒª·¢Ë͵½·þÎñ¶ËµÄÊý¾ÝÁË,¿ÉÒÔÕâÑùÀí½â:ÓÐÒ»¸öÃûΪcountryµÄ±äÁ¿,ËüµÄֵΪ»¨À¨ºÅ{}ÀïµÄÄÚÈÝ -->
<mx:request>
<country>{country.value}</country>
</mx:request>
</mx:HTTPService>
<mx:VBox>
<!-- ´Ë¿Ø¼þµÄÊý¾ÝÓɵÚÒ»¸ö<mx:HTTPSer ......

Flexѧϰ Ϊһ¸öʼþ½¨Á¢¶à¸ö¼àÌý

·½·¨Ò»£º
<?xml version="1.0"?>
<!-- events/MultipleEventHandlersInline.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script><![CDATA[
private function submitForm(e:Event):void {
// Handle event here.
}
private function debugMessage(e:Event):void {
// Handle event here.
}
]]></mx:Script>

<mx:Button id="b1"
label="Do Both Actions"
click='submitForm(event); debugMessage(event);'

/>

</mx:Application>
·½·¨¶þ£º
<?xml version="1.0"?>
<!-- events/MultipleEventHandlersAS.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="createHandlers(event)">
<mx:Script><![CDATA[
public function createHandlers(e:Event):void {
b1.addEventListener(MouseEvent.CLICK, submitForm);
b1.addEventListener(M ......

flex Alert×é¼þÓ÷¨


<?
xml
 
version
=
"1.0"
?>
  
<!-- Simple example to demonstrate the Alert control. -->
  
<
mx:Application
 
xmlns:mx
=
"http://www.adobe.com/2006/mxml"
>
  
  
    <
mx:Script
>
  
        <![CDATA[
 
            import mx.controls.Alert;
 
            import mx.events.CloseEvent;
 
        
 
            // Event handler function uses a static method to show
 
            // a pop- ......

Flex¹ú¼Ê»¯(I18N )

×î¼òµ¥µÄ·½·¨ÊDZ¾µØ»¯±àÒ룬¼´±àÒ벻ͬµÄÓïÑÔ°æ±¾
£¬È»ºóʹÓÃ
Application Server
À´Åж¨¿Í»§Ê¹ÓõÄÊÇÄÄÖÖÓïÑÔ£¬²¢×Ô¶¯Ö¸Ïò¶ÔÓ¦µÄ
swf
Îļþ¡£
¾ßÌå×ö·¨ÈçÏ£º
ÔÚÏîÄ¿Éϵã»÷ÓÒ¼ü£¬Ñ¡Ôñ
Properties
¡£
È»ºóÑ¡Ôñ
Flex Compiler
£¬ÔÚ
Additional Compiler arguments
ÏÂÃæÒѾ­ÅäÖúÃÓïÑÔ°üÁË£¬Ä¬ÈÏΪ
-locale en_US
¡£
ÕâʱÎÒÃÇ¿ÉÒÔÓÃÒ»¸ö
locale
Ŀ¼À´¼òµ¥¶¨ÖÆÎÒÃǶîÍâÉèÖ㨵±È»²»°üÀ¨
Flex
ÄÚ
²¿¿Ø¼þµÄÓïÑÔ£©
µÄ
ÓïÑÔÉèÖá£
±ÈÈç¸ÄΪ£º
-locale=en_US
-source-path+=g:\flexproj\locale\{locale}
¡£ÕâÑùÔÚ
g
ÅÌ
µÄ
flexproj
Ŀ¼Ï½¨Á¢Ò»¸ö
locale
Ŀ¼¡£
È»ºóĿ¼Ï·ÅÖðüº¬ÎÒÃÇÒªÀ©Õ¹µÄÓïÑÔÎļþµÄÎļþ¼Ð¾Í¿ÉÁË¡£±È
Èç
£º
g:\flexproj\locale\en_US
¡£
×¢Ò⣺
locale
ÏÂÃæµÄĿ¼ÃûÓ¦¸ÃºÍ
-locale=
ÉèÖõÄÃû³ÆÒ»Ö¡£
ÄÇôÕâÑù£¬ÎÒÃǾͿÉÒÔʹÓöîÍâµÄÓïÑÔÉèÖÃÁË¡£
Àý£º
Additional Compiler arguments
ÅäÖÃΪ
-locale+=en_US
-source-path+=g:\flexproj\testgoufang\locale\{locale}
È»ºóÔÚ¶ÔÓ¦µÄ
locale
Ŀ¼ÏÂÌí¼Ó¹ú¼Ê»¯×ÊÔ´Îļþ
g:\flexproj\testgoufang\locale\en_US\strings.properties
ÕâÒ»²¿·Ö¸ú
struts
Ï ......

flex ×ÊÔ´¹ú¼Ê»¯

ÏÖÔÚflash builder 4ÒѾ­×Ô´øÁ˶àÖÖÓïÑÔ°ü£¬ÔÚʹÓõÄʱºòÖ±½ÓÄùýÀ´ÓþͿÉÒÔÁË£¬ÔÚʹÓÃ×ÊÔ´ÎļþµÄʱºò£¬ÐèÒªÉèÖÃÒ»ÏÂ×ÊÔ´²ÎÊý
-locale=en_US,zh_CN -source-path=locale/{locale}
flex 3.xµÄ°æ±¾µÄsdkÖ»Ö§³ÖÓ¢ÎĺÍÈÕÎÄ£¬Èç¹ûÐèÒªÖÐÎÄ£¬Ôò¿ÉÒÔ´Óflex
4.xsdkµÄ\frameworks\locale¿½±´zh_CNµÈÎļþ¼Ðµ½flex3.xµÄ\frameworks\localeĿ¼Ï¾ͿÉÒÔÁË
-locale=en_US,zh_CNÕâÀïÊÇÄãÉèÖÃÒªÖ§³ÖµÄÓïÑÔ£¬ÒÔ","
¸ô¿ª£¬-source-path=locale/{locale}ÊÇÏà¶ÔÏîÄ¿¸ùĿ¼locale/{locale}ÕâÀïÊÇÏà¶ÔsrcµÄ£¬ÊÇÔÚsrc
/localeÎļþ¼ÐϵÄ×ÊÔ´Îļþ£¬²¢ÇÒ£¬ÐèÒªÃüÃûen_US£¬zh_CN×ÊÔ´Îļþ¼Ð,²¢ÇÒ×ÊÔ´ÎļþµÄÃû³Æ±ØÐëÒ»Ö¡£-source-
path=locale/{locale}ºóµÄlocale/{locale}Ò²¿ÉÒÔʹ¾ø¶Ô·¾¶ÀýÈçD:/workspace/locale
/{locale},
ÀýÈç×ÊÔ´ÎļþÃû³Ælanguage.properties
ÀïÃæµÄÄÚÈÝΪ
en_US
user=username
pass=passowrd
zh_CN
user=ÐÕÃû
pass=ÃÜÂë
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml
"
layout="absolute" minWidth="1024" minHeight=" ......
×ܼǼÊý:792; ×ÜÒ³Êý:132; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [15] [16] [17] [18] 19 [20] [21] [22] [23] [24]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ