¹ØÓÚflexÔÚ×öÏîÄ¿ÖÐÓöµ½µÄÎÊÌâ
×î½üÓÃflexÀ´×öÒ»¸ö¹¤×÷Á÷¶¨Òå±à¼Æ÷¡£ÔÚÍøÉÏÕÒÁ˺ܶàÀý×Ó£¬Ò²Ñ§µ½Á˲»ÉÙ¶«Î÷¡£
flexÊÇadobe¹«Ë¾³öµÄ¶ÔÓÚflashµÄÒ»¸ö²úÆ·¡£¶ÔÓÚѧ¹ýjavaµÄÈËÀ´ËµÔÙ¼òµ¥²»¹ýÁË¡£ÕâÀïÒ²²»¶à˵ÁË£¬¾Í¶ÔÓÚÕ⼸ÌìÔÚÏîÄ¿ÖÐÓöµ½µÄÎÊÌâ̸һÏÂ×Ô¼ºµÄ½â¾ö·½·¨ÓëÈÏʶ¡£
Ò»¡¢flexÖн«×Ô¼ºµÄÒ»¸öCanvas±ä³ÉΪͼƬ£¬±£´æµ½±¾µØ¡£
var bitmapData:BitmapData = new BitmapData(myCanvas.width, myCanvas.height);
bitmapData.draw(myCanvas,new Matrix());
var byteArray:ByteArray = new JPEGEncoder(80).encode(bitmapData);
ÕâÀï±ä³ÉÁËÒ»¸ö×Ö½ÚÊý×飬
±£´æ±¾µØ¿ÉÒÔÓÃ(FileReference)£ºfr.save(byteArray,filename);
Ô¶³ÌµÄ¿ÉÒÔÓÃ:
var request:URLRequest = new URLRequest(url);
request.method=URLRequestMethod.POST;
request.contentType = "application/octet-stream";//
request.data = byteArray;
var loader:URLLoader = new URLLoader();
try{
loader.load(request);
}catch (error:Error) {
Alert.show("ÉÏ´«Ê§°Ü");
}
¶þ¡¢¹ØÓÚ¸øasÖеıäÁ¿´ÓÍⲿ¸øÓè³õʼֵ¡£Õâ¸öÎÒÓõÄÊÇjavascript¡£
asÖУº
--------------------------------------------------------------------
ExternalInterface.addCallback("setSessionId",setSessionId);//¸øjavascriptµ÷ÓõĽӿÚ
private function setSessionId(argId:String):void{
fileUpload.JSessionId = argId;
}
--------------------------------------------------------------------------------
Ïà¹ØÎĵµ£º
×î½üÔÚ¿´Flex3ȨÍþÖ¸ÄÏ£¬ÀïÃæ¶ÔÒ³Ãæ¼Ü¹¹ºÍRIA¼¼Êõ×ܽáµÄºÜºÃ¡£
Ò». »ùÓÚÒ³Ãæ¼Ü¹¹µÄWebÓ¦ÓÃÁ÷³Ì
1. Óû§´ò¿ªä¯ÀÀÆ÷£¬ÏòWEB·þÎñÆ÷ÇëÇóÒ»¸öÒ³Ãæ¡£
2. WEB·þÎñÆ÷ÊÕµ½ÇëÇó¡£
3. (optional)ÍøÂç·þÎñÆ÷°ÑÇëÇ󽻸øÓ¦Ó÷þÎñÆ÷À´¶¯Ì¬×é×°Ò³Ãæ¡£
&nb ......
===============================
ͼÁé³ÌÐòÉè¼Æ´ÔÊ飨Web¿ª·¢ÏµÁУ©
===============================
The Essential Guide to Flex 2 with ActionScript 3.0
&nb ......
FlexÀïÃæÓм¸¸ö×é¼þ»¹Ã»Óùý£¬×î½üÕýºÃûÊ£¬¾Í¶¼Ð´Ð´demoÀ´Ê¹ÓÃһϣ¬Õâ¸öÀý×ÓÊÇÔÚÒ»±¾½Ð¡¶Flex´óʦ֮·¡·µÄÊéÉÏ¿´µ½µÄ£¬Í¦ºÃµÄ£¬¾ö¶¨Ð´ÔÚÕâÀﱸÍü£¬·½±ãÒÔºó²éÔÄ¡£
Accordionµ¼º½ÓеãÀàËÆÒ»¸öÕÛÒ³£¬ÔÚÿһҳ¶¼°üº¬Ò»¸ö×ÓÈÝÆ÷£¬Ã¿Ò»´ÎÖ»ÏÔʾһ¸öÒ³£¬Ò²¾ÍÊÇÒ»¸ö×ÓÈÝÆ÷¡£ÎÒÃÇÕâ¸öÀý× ......
adobeµÄas3libÀïÃæÓиöJSON¿â£¬µ«ÊDz»ºÃÓ㬸ñʽ¶¨ÒåÒªÇó·Ç³£Ñϸñ£¬¾³£»áÓÐЩĪÃûÆäÃîµÄ´íÎó£¬Èç¹û²»ÊǷdz£±ØÒª·ñ´«ÊäÊý¾Ý»¹ÊÇʹÓÃXML±È½Ï¿É¿¿Ò»µã£¬ÄܼõÉÙһЩ²»±ØÒªµÄµ÷ÊÔʱ¼ä¡£
1¡¢Îı¾¶¨Òåkey¡¢valueÖµ¶¼Òª¼ÓË«ÒýºÅ£¬keyÖµ±ØÐë¼Ó£¬value½¨Òé¼ÓÉÏ£»
2¡¢ÎðʹÓõ¥ÒýºÅ´úÌæË«ÒýºÅ£»
3¡¢ÖÐÎıàÂë±ØÐëÑϸñ²âÊÔ£¬¼´Ê¹Í¬Ê ......
Ò»£ºÖ±½ÓÉèÖÃ
¶þ£º»ÃæÉÏÉèÖãº
È磺
<mx:Style>
TextArea{
font-size:36px
font-weight: bold
}
</mx:Style>
Èý£ºÊ¹ÓÃÍâÖÃÎļþ
<mx:Style source="style.csss"/> ......