Flex Resource Bundle ÔÚLocalization·½ÃæµÄÓ¦ÓÃ
Flex frameworkÓÐÌṩResource Bundle£¬ÓÃÓÚ¶ÔÍⲿ×ÊÔ´µÄÒýÓá£
¶øÆäÒ»¸ö»ù±¾µÄÓ÷¨¾ÍÊÇÓÃÓÚÓ¦ÓóÌÐòµÄLocalization£¬ÈóÌÐò¸ù¾Ý²»Í¬µÄlocaleÏÔʾ²»Í¬µÄÎÄ×Ö£¬Í¼Æ¬¡£»»¾ä»°£¬Äã±ØÐëΪÿ¸ölocale×¼±¸Ò»Ì×asset¡£
ÔÚ¾ßÌåÓ¦ÓõÄʱºò£¬Äãͨ³£Òª¾ö¶¨Ê¹ÓÃÒÔÏÂÁ½¸ö²ßÂÔ¡£ÏÂÃæÒÔÒýÓÃÍâÔÚµÄÒ»¾äÎÄ×Ö×öÀý×Ó¡£
²ßÂÔÒ»£º±àÒëʱÉ趨
¼´ÄãÔÚ±àÒëʱ£¬ÒѾ¾ö¶¨Ê¹ÓÃÄÄÒ»¸ölocale£¬²¢ÇÒ²»Äܸı䡣Èç¹ûÄãÒª¸Ä±älocale£¬±ØÐëÐ޸ıàÒë²ÎÊýÖØÐ±àÒë¡£ÕâÒâζ×ÅÄãҪΪÿ¸ölocale±àÒëÒ»¸öapplication.
Óŵ㣺ʵÏÖ¼òµ¥£¬×ÊÔ´»ábuild-inÔÚapplicationÀïÃæ¡£
ȱµã£º²»Äܶ¯Ì¬¸Ä±älocale¡£
1 ½¨Á¢resource Îļþ¡£
ÀýÈ磬 example.properties£¬ÄÚÈÝÈçÏÂ
welcome=Hello World
²¢°ÑËü·ÅÖÃÔÚsourceµÄ¸ùĿ¼ÏÂ
2 ÔÚ³ÌÐòÖÐÉùÃ÷ÆäÒýÓá£
<fx:Metadata>
[ResourceBundle("example")]
</fx:Metadata>
ÆäÖеģ¨ £©ÄÚµÄÃû×ÖÓë1ÖеÄÎļþÃûÏàͬ¡£
3 ±àÒëʱ£¬×¢Òâlocale²ÎÊý±ØÐëÉèÖÃΪ·Ç¿Õ£¬»òÕßʹÓÃĬÈÏÖµ(en_US)
4 ʹÓÃ
resourceManager.getString('example','welcome')£» // ²ÎÊýһΪ2ÖÐÉùÃ÷×ÊÔ´Ãû£¬²ÎÊý¶þΪ×ÊÔ´ÖеÄÊôÐÔÃû¡£
locale ¿ÉÒÔ²»Ö¸¶¨£¬ÒòΪ±àÒëµÄʱºò£¬ÒѾ°Ñlocale²ÎÊýµÄÖµÉèΪĬÈϵÄÖµ£¬Èç¹ûÖ¸¶¨£¬Îñ±ØÈ·±£Á½ÕßÏàͬ¡£
5 µ±ÐèÒª¸Ä±älocaleʱ£¬ÔòÖ±½ÓÌæ´úµôresourceÎļþ¡£
¸üºÃµÄ×ö·¨ÊÇ£¬±àÒ벻ͬµÄlocaleʱ£¬°Ñ²»Í¬resourceµÄÎļþ¼ÐÌí¼Óµ½source·¾¶¡£ÀýÈ磬°ÑresourceµÄÎļþ£¬°´locale·Ö³Éen_US,fr_FR......µÈÎļþ¼Ð¡£
²ßÂÔ¶þ£ºÔËÐÐʱÉ趨
ÕâÒâζ×ÅÄã¿ÉÒÔÔÚÔËÐÐʱ¶¯Ì¬¸Ä±älocale¡£ÕâÐèÒª°Ñresource±àÒë³Émodule£¬²¢ÔÚÔËÐÐʱloadµ½application ÀïÃæ¡£
Óŵ㣺Äܶ¯Ì¬¸Ä±älocale£¬°Ñreource module»¯¡£
ȱµã£ºÊµÏÖ¸´ÔÓ¡£
1 ͬÉÏ
2 ͬÉÏ
3 ±àÒëʱ£¬ÕâÀïΪֱ¹ÛÆð¼û£¬ÓÃÃüÁîÐз½Ê½ËµÃ÷¡£
mxmlc -locale= -resource-bundle-list=bundles.txt Main.mxml
½á¹û²úÉúµÄmain.swf,²»»á°üÀ¨localeµÄÐÅÏ¢£¬Ò²²»»áÓÐÈκÎĬÈϵÄlocaleÖµ¡£ÁíÍ⻹»á²úÉúÒ»¸ö bundles.txt. ËüÀïÃæÁгöÁËÕâ¸öapplication ÐèÒªµÄ×ÊÔ´Ãû³Æ£¨°üÀ¨frameworksµÄ×ÊÔ´£©¡£ÕâÀïÎÒÃǻῴµ½txtÀïÃæµÄÄÚÈÝ»áÊÇ£º
bundles = SharedResources components controls core effects example layout skins styles
4 °Ñÿ¸ölocaleµÄresource±àÒë³ÉÒ»¸ömodule¡£
mx
Ïà¹ØÎĵµ£º
Ò»¡¢C++·þÎñÆ÷¶Ë
£¨ÓõÄÊÇVisual Studio 2008£¨05£¬03µÄÓ¦¸ÃÒ²¿ÉÒÔ£¬VC++µÄ¿ÉÄÜÐèÒªÉÔ΢¸Ä¶¯£©£©
´úÂëÈçÏ£º
#include <winsock2.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
using namespace std;
#pragma comment(lib,"ws2_32.lib")
void main(){ ......
RIA£¨Rich Internet Application£©—— ¸» Internet
Ó¦ÓÃÒÔÆäÁ¼ºÃµÄ¿Í»§ÌåÑéµÃµ½Ô½À´Ô½¹ã·ºµÄÓ¦Óã¬ÒøÐУ¬µçÐŵÈÁìÓòÒÑÓÐÖî¶à³É¹¦°¸Àý¡£Adobe µÄ Flex ÊÇ×î¾ßÓдú±íÐԵĻùÓÚ Flash µÄ RIA
¼¼Êõ¡£Í¨¹ý¶Ô Flex ÒÔ¼°µ±Ç°Á÷ÐÐµÄ Spring¡¢Hibernate µÄ J2EE ¿ªÔ´¿ò¼Ü½øÐм¯³É£¬Ê¹¿Í»§¼ÈÄÜ»ñµÃµ½Ò»Á÷µÄÓû§ÌåÑ飬ÓÖ ......
1.flex²ú³öÎïµÄÐÎʽÓÐÁ½ÖÖ flashÎļþ »òÕßairÎļþ¡£
1).flashÓÃflash player²¥·Å
2).airÎļþÐèÒªÓÃflexµÄruntimeÔËÐУ¬ÀàËÆjavaµÄjre ºÍ.netµÄ.net runtime
2.ʹÓÃflex builder¿ÉÒÔ¿ÉÊÓ»¯¿ª·¢£¬ÓÐjava»òÕß.net»ù´¡£¬»òÕßjavacript»ù´¡+ÃæÏò¶ÔÏó»ù´¡£¬ÈëÃźÜÈÝÒס£
3.ÌṩÁËһЩÀà¿â£¬¿ÉÒÔʹÓá£
4.Í ......
еÄÒ»ÆÚµÄflash&flex ¹úÍâµÄÔÓÖ¾·¢²¼£¬¿´À´Ò»°àÖÆ×÷ÈËÕæµÄºÜÓÐÐÄ˼¡£×î½üCSDN ͼƬÉÏ´«²»µ½£¬Á¬Ð´¶«Î÷Ò²²»·½±ãÁË¡£
ËùÒÔ¾ÍÎÞ°ì·¨ÌùͼÁË
ÓÐÐËȤµÄÈË¿ÉÒÔµ½ÕâÀïÏÂÔØÐµÄÒ»ÆÚÍâ¹úµÄ¹ØÓÚflash ºÍflex ×ÊѶµÄÔÓÖ¾¡£
http://ffdmag-en.software.alfa.javatech.com.pl/download-1-2010 ......
1£º¼ÙÈçÄãÒªÉî¸´ÖÆÒ»¸öÀàA
public class A
{
¡¡¡¡public var vo:B
}
ÄãÊ×ÏÈÒª×öµÄÊÇ×¢²áÀ࣬ÀýÈ磺
public static function registerClass():void
{
¡¡¡¡//°Ñ×ÓÀà×¢²á
PackUtil.registerClass(B);
}
//½ÓÏÂÀ´¾ÍÊǿˡ£º
¡¡¡¡var cloneA:A=clone(A);
cloneA¾ÍÊÇÎÒ ......