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

flex ½ØÍ¼

ÔÚflexÖÐÒ²¾­³£»áÓõ½½ØÍ¼¹¦ÄÜ£¬²¢ÇÒ½«½ØÍ¼µÄͼƬ±£´æÖÁ±¾µØ¡£Ò»Ï뵽ͼƬÄÇôÎÒÃǾÍ×ÔÈ»Ïëµ½ËûµÄ´æÔÚÐÎʽ bitmap byteArray.ËùÒÔ×ÔÈ»¾Í»áÁªÏµµ½bitmapÀàÉÏÈ¥¡£
ÏÂÃæÈÃÎÒÃÇÒ»ÆðÀ´¿´¿´¶¼ÓÐÄÄЩ·½·¨°É¡£
·½·¨Ò»£º°´ÎÒÃÇ×ÔÈ»µÄ˼·ʵÏÖ£º
ÔÚapplicationÖÐÓÐÁ½¸öÈÝÆ÷£º
<mx:Canvas id="virtour_cav" top="0" bottom="0" left="0" right="0">
  
</mx:Canvas>
<mx:Canvas right="0" top="0" width="200" height="200">
    <mx:Image id="cpImg" left="0" right="0" bottom="0" top="0"/>
</mx:Canvas>
µ±ÎÒÃǵã»÷½ØÍ¼Ê±Ö´ÐÐ
private function CaptureImage():void{
             var bd:BitmapData=getBitmapData(UIComponent(virtour_cav));
             cpImg.source= new Bitmap(bd);
}
private function getBitmapData(target:UIComponent):BitmapData{
         var bd:BitmapData= new BitmapData(target.width,target.height);
        
         var m:Matrix=new Matrix();
         bd.draw(target,m);
         return bd;
}
×îºóʹÓÃFileReference.save()·½·¨±£´æ¾Í¿ÉÒÔ¡£
fileReference.save(new Bitmap(bd),"δÃüÃû.jpg");
·½·¨¶þ£ºÖ±½ÓʹÓÃͼƬ½ØÍ¼ÀàImageSnapshotʵÏÖ
Õâ¸ö¾Í¸ü¼òµ¥ÁË¡£
private var jpgeEnc:JPEGEncoder=new JPEGEncoder();
private var fileReference:FileReference=new FileReference();
private function CaptureImage():void{
             var imgSnapshot:ImageSnapshot=ImageSnapshot.captureImage(virtour_cav,0,jpgeEnc);
             fileReference.save(imgSnapshot.data,"δÃüÃû.jpg");
}
µ«ÊÇÕâÁ½¸ö·½·¨ÊµÏÖµÄǰÌáÊÇflash ²¥·ÅÆ÷ÒªÇóÊÇ10ÒÔÉÏ
Èç¹ûÎÒÃÇÒªÓÃһЩ flash player 10 ÉϲÅÌṩµÄ¹¦ÄÜʱ£¬ÐèÒªÔÚÏîÄ¿ÊôÐÔÀïÉèÖÃһϣ¬·ñÔò»áÕÒ²»µ½´Ë·½·¨£¬±


Ïà¹ØÎĵµ£º

flexÖеÄaddEventListener·½·¨

flex¿Ø¼þ¶ÔÏó¡¢RemoteObjectµÈ¶¼ÓÐÒ»¸ö¹²Í¬µÄ·½·¨addEventListener¡£
addEventListener·½·¨ÈçÏ£º
public function addEventListener(type:String, listener:Function,
useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
{
eventDispatcher.addEventListener(type, listener, us ......

Flex——IDispose½Ó¿Ú

ǰÑÔ
C/C++µÄ¿ª·¢£¬ÄÚ´æµÄ¹ÜÀíÊÇÊ®·ÖÖØÒªµÄ¿ÎÌ⣬·ÖÅäÄÚ´æÊ¹ÓúóÒª¼°Ê±ÊÍ·Å£¬·ñÔòÄÚ´æÐ¹Â©µ¼ÖÂÄÚ´æºÄ¾¡¡£½øÈëÍйܻ·¾³ºó£¬ÄÚ´æÄܹ»×Ô¶¯¹ÜÀíºÍ»ØÊÕ£¬ÒѾ­²»Óÿª·¢ÕßÌ«²ÙÐÄÄÚ´æ¹ÜÀí·½ÃæµÄÎÊÌâÁË£¬ÔÚÍйܻ·¾³£¬¿ª·¢ÕßÈÔÈ»¿ÉÒÔ×öһЩ¹¤×÷£¬ÌṩÄÚ´æ»ØÊÕµÄЧÂÊ£¬ÀýÈ磬°ÑÀàÄÚ²¿µÄÒýÓöÔÏóÉèÖÃΪnullÊÇ×î»ù±¾µÄ¡£½è¼øÔÚ.net»·¾³ ......

Flex——ÃüÁî¹ÜÀí£¬UndoÀ´RedoÈ¥

ǰÑÔ
Undo£¬RedoÊDZ༭»·¾³Àï³£¼ûµÄ²¢Çҷdz£ÖØÒªµÄ¹¦ÄÜ£¬ÏÂÃæ½éÉÜ¡¾ÃüÁîģʽ¡¿ÔÚFlex/AS3ϵÄʵÏÖ¡£
ICommand½Ó¿Ú
¶¨ÒåICommand½Ó¿Ú£¬ÆäÖÐExecuteºÍUnExecuteÊÇÏà·´µÄ2¸ö²Ù×÷£¬TitleÊôÐÔÓÃÓÚÃüÁîÏÔʾ£¬ÀýÈçÏÔʾÔÚ²Ù×÷ÀúÊ·ÁбíÀï¡£
package cwn.wb.ui.core.command
{
    import cwn.core.IDi ......

Flex Repeater¿Ø¼þ×¢Òâ

Repeater ¹ËÃû˼Ò壬Repeat¾ÍÊÇÖØ¸´µÄÒâ˼£¬ Repeater ¾ÍÊÇÓÃÀ´Öظ´µÄ¿Ø¼þ
 Repeater »á¸ù¾ÝÊý¾ÝÔ´ÖжÔÏóµÄ¶àÉÙÀ´²úÉú¶àÉÙ¸ö×ÓÏÉú³ÉµÄ×ÓÏîÈ«²¿ÊÇÒÔÊý×éÐÎʽ´æÔÚµÄ
 <mx:Repeater id="myRepeater" dataProvider="{myArray}">
        <mx:HBox>
  ......

Flex RPGÓÎÏ·DEMO (1)£ºÖ÷Ò³ÃæÖÆ×÷

   ѧFlexÒ²ÓÐÒ»¶Îʱ¼äÁË£¬²Î¿¼ÁËÐí¶àÈ˵Ä×ÊÁÏ¡£Ò»Ö±Ïë×Å×Ô¼ºÐ´µã¶«Î÷·ÖÏí¸ø´ó¼Ò¡£ÈçÊÇ£¬×Ô¼º×¼±¸Ð´ÕâÑùµÄÒ»¸öRPGÓÎÏ·DEMOµÄϵÁС£»òÐí×Ô¼ºµÄËã·¨£¬½á¹¹ÉÏÉè¼ÆÓÐЩÐíÎÊÌ⣬µ«ÈÔÏ£ÍûÄܸø´ó¼Ò´øÀ´°ïÖú£¬²»ºÃµÄµØ·½ÇëPASSµô¡£¡£¡£~~ÓÎÏ·Ò²²Î¿¼ÁËÉîÀ¶É«ÓÒÊÖµÄÐí¶àÉè¼ÆË¼Ï룬ÔÚ´ËÏòÆä±íʾ¸Ðл¡£ËûµÄ²©¿ÍµØÖ·£ºhttp://w ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ