¹ØÓÚ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;
}
--------------------------------------------------------------------------------
Ïà¹ØÎĵµ£º
#####################
# B/S & C/S
#####################
B/S(Browser/Server,ä¯ÀÀÆ÷-·þÎñÆ÷)½á¹¹,¿Í»§¶ËÖ»Ðèä¯ÀÀÆ÷¼´¿É£¬¿çƽ̨ÐԽϺ㻼ò»¯ÁË¿Í»§¶ËµÄ¹¤×÷£¬ÏàÓ¦µØ¶Ô·þÎñÆ÷ÐÔÄÜÒªÇó½Ï¸ß£»Óë´Ëͬ
ʱ£¬ÒòΪËü£¨¾¡¹ÜÓÐAJAX£©ÎÞ·¨´Ó¸ù±¾Éϸıä“ÍøÂçÓ¦ÓóÌÐòµÄ±íʾ²ã½¨Á¢ÓÚHTMLÒ³Ãæ&rdqu ......
flexµÄʼþ·Ö·¢ÊǸöºÃ¶«Î÷£¬µ«ÊÇʵ¼Ê±à³ÌµÄʱºòÌ«¶à¶òÓà´úÂ룬¶øÇÒʼþÖ®¼ä´©À´²åÈ¥£¬²»·ûºÏÒ»°ã³ÌÐòÔ±µÄÊéдϰ¹ß£¬Í¬ÑùµÄExtjsÒ²ÊÇ»ùÓÚÒì²½´¦Àí²¢ÇÒËüµÄ´úÂ뼸ºõijÖ̶ֳÈÉÏ¿ÉÒÔÀí½âÊÇflexµÄjs°æ±¾£¬µ«¾ÍûÄÇô¶àÈËÂñÔ¹ËüµÄÒì²½´¦ÀíºÜÂé·³¡£
½â¾ö°ì·¨£º
1¡¢ÆÚ´ýij¸öflash builderµÄ²å¼þ¼°¿ò¼Ü£¬¿É·â±Õ¹ÜÀíʼþ£¬²¢ÇÒʼþÁ ......
package
{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flashx.textLayout.formats.BackgroundColor;
import spark.effects.interpolation.RGBInterpolator;
public class Map extends Sprite implements IMap
{
//¸ñ×ӵĿí¸ß
private va ......
ÔÚEclipseÖУ¬Óиö¿ì½Ý¼üÊǶÔjava´úÂë½øÐиñʽ»¯£¬Ð´Íê´úÂëºó¾õµÃ´úÂë¸ñʽ²»¹»ºÃ£¬°´Ï¿ì½Ý¼ü¾Í¸ã¶¨ÁË¡£µ«ÊÇÔÚFlex¿ª·¢ÖУ¬ºÜÍ·ÌÛµÄÎÊÌâÊÇûÓÐÌṩ¶Ôas3´úÂëºÍMXML´úÂë¸ñʽ»¯µÄÖ§³Ö£¬ÎÒÔÚÍøÉÏËÑË÷ÁËһϣ¬·¢ÏÖÒ»¸ö¿ªÔ´µÄºÃ¹¤¾ß£ºFlex Formatter ÏîÄ¿ÍйܵØÖ·£ºhttp://sourceforge.net/projects/flexformatter/ È¥ÉÏÃæÄǸö ......
ÒòΪ×î½ü×öÒ»¸öDIYµÄÉè¼ÆÆ÷£¬ÐèÒªÈÃÓû§Ñ¡Ôñij¸ö×ÖÌ壬²¢ÇÒÖ§³ÖÐýת£¬ÍÏÀµÈ²Ù×÷¡£Ö±½ÓʹÓÃÎı¾¿òÊDz»Ðеģ¬ÒòΪflex²»Ö§³Ö×ÖÌåµÄÖ±½ÓÐýת£¬´ó¼Ò¿ÉÒÔ³¢ÊÔһϣ¬Èç¹ûÑ¡ÔñÁËtext¿Ø¼þ£¬ÎÄ×־Ϳ´²»µ½ÁË£¬Óиö°ì·¨ÊÇ°ÑÎÄ×ÖembedǶÈëµ½swfÖÐÈ¥£¬ÕâÑù¾ÍÖ§³ÖÁË¡£
µ«ÊÇÓ¢ÎÄ»¹ºÃ£¬×ÖÌåÎļþ²»´ó£¬ÖÐÎĵĻ°¶¯éü¼¸¸öM£¬Õâ¸ö×ö·¨ºÜ²»ÏÖʵ ......