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

flexÉÏ´«Îļþ

1.flex¶Ë
  <mx:Button id="upload" label="ÉÏ´«Îļþ" click="ExternalInterface.call('openUpload');"/>
2ºǫ́
  2.1 openUploadÊǺǫ́µÄjs½Å±¾(jsp)
        function openUpload(){
  var url="/OA/service/upload.jsp";
newWin=jscomNewWinOpenBySize(url,"ÎļþÉÏ´«",350,150);
}
function jscomNewWinOpenBySize(url,target,width,height){
 
 
        var tt,w,left,top;
  if (!width) width=screen.width;
  if (!height) height=screen.height-60;
  left=(screen.width-width)/2;
  if(left<0){ left=0;}
  top=(screen.height-60-height)/2;
  if(top<0){ top=0;}
        tt="toolbar=no, menubar=no, scrollbars=yes,resizable=yes,location=no, status=yes,";
        tt=tt+"width="+width+",height="+height+",left="+left+",top="+top;
     w=window.open(url,target,tt);
  try{
   w.focus();
  }catch(e){}
  return w;
}
upload.jsp
<%@ include file="/service/common.jsp"%>
<%@ page contentType="text/html; charset=gbk"  language="java"%>
<html>
<head>
<title>¸½¼þÉÏ´«</title>
<script type="text/javascript" language="javascript">
addEventSimple(window,"load",initial);
function initial(){
 o4lukaForm=document.getElementById("lukaForm");
 o4myFile1=document.getElementById("myFile1");
 o4asslb=document.getElementById("asslb");
 o4ahigbg=document.getElementById("ahigbg");
 if(o4myFile1.value!=""){
 o4lukaForm.submit();
 }else{
  o4asslb.style.display="block";
 }
 
}
 
function getFileSize(filePath){    
 o4asslb=document.getElementById("asslb");
 o4asslb.style.display="none";
 var image=new Image();  
  &nbs


Ïà¹ØÎĵµ£º

Flex Resource Bundle ÔÚLocalization·½ÃæµÄÓ¦ÓÃ

Flex frameworkÓÐÌṩResource Bundle£¬ÓÃÓÚ¶ÔÍⲿ×ÊÔ´µÄÒýÓá£
¶øÆäÒ»¸ö»ù±¾µÄÓ÷¨¾ÍÊÇÓÃÓÚÓ¦ÓóÌÐòµÄLocalization£¬ÈóÌÐò¸ù¾Ý²»Í¬µÄlocaleÏÔʾ²»Í¬µÄÎÄ×Ö£¬Í¼Æ¬¡£»»¾ä»°£¬Äã±ØÐëΪÿ¸ölocale×¼±¸Ò»Ì×asset¡£
ÔÚ¾ßÌåÓ¦ÓõÄʱºò£¬Äãͨ³£Òª¾ö¶¨Ê¹ÓÃÒÔÏÂÁ½¸ö²ßÂÔ¡£ÏÂÃæÒÔÒýÓÃÍâÔÚµÄÒ»¾äÎÄ×Ö×öÀý×Ó¡£
²ßÂÔÒ»£º±àÒëʱÉ趨
......

ΪFlex Builder °²×°Á½¸öʵÓõIJå¼þ

1¡¢Subclipse
×î½ü¹¤×÷ÖУ¬ËùÓÐÏîÄ¿¶¼ÔÚSVNÖнøÐС£ÓÉÓÚFlex BuilderûÓÐÄÚÖÃSVNÖ§³Ö£¬ºÜÊDz»±ã¡£ÔÚ±àÒëʱ£¬”svn”Îļþ¼Ð»áµ¼ÖÂһЩĪÃû´íÎó¡£ÔÚ±àдFlash asʱ£¬ÎÒÏÖÔÚÏ°¹ßÓÃFlash Develop£¬Ð¡ÇÉʵÓã¬Ò²Ö§³ÖSVN¡£ÎªÁË·½±ã£¬¸øFlex BuilderÒ²×°ÁËSVN²å¼þ¡£ÓÉÓÚFB»ùÓÚEclipse£¬°²×°·½·¨¶¼ÊÇÒ»ÑùµÄ¡£
Ñ¡Ôñ He ......

Flex DataGridäÖȾͼƬ

³õѧflex£¬Óöµ½Ò»¸öÎÊÌâ‘ÔÚdatagridµÄÒ»ÁÐÖÐÀûÓÃËüµÄֵת»»ÏÔʾ²»Í¬µÄͼƬ’£¬ÔÚÍøÉÏËÑÁËËÑÎÊÁËÎÊ£¬½â¾öÁË°¥,½â¾ö°ì·¨Ìù³öÀ´£¬Ï£Íû¶ÔÆäËûÈËÓаïÖú£¬
ÀûÓÃdatagridµÄlabelFunction½â¾öµÄ£¬ÈçÏ£º
ÔÚdatagridµÄ
<mx:DataGridColumn  dataField="level"  labelFunction="formatiImg"/>
/* ......

flexͨ¹ýHTTPService×é¼þ¶ÁÈ¡¸´ÔӽṹµÄxmlÎļþ

    ŪÁËÁ½Ì죬ÖÕÓڰѸ´ÔÓµÄxmlÎļþµÄÊý¾Ý¸ù¾Ý×Ô¼ºµÄÒªÇó¶Á³öÀ´£¬ÏÔʾÔÚÒ³ÃæÉÏÁË¡£flexͨ¹ýHTTPService×é¼þ·¢ËÍÇëÇ󣬶ÁÈ¡xmlÎļþÖÐÊý¾Ý£¬ÓÃxmllistcollection´æ´¢xmlÖÐijһ²¿·ÖÊý¾Ý£¬²¢°ó¶¨ÔÚgridview¿Ø¼þÉÏ¡£
    xml£¬xmllist£¬xmllistcollectionÖÐÖ»ÓÐxmllistcollection¾ßÓÐÐ޸ĸüÐÂÊý¾ ......

×Ô¶¨ÒåÕæÕýµÄ¿ÉÖØÓÃFlex×é¼þ

À´Ô´£ºhttp://blogs.adobe.com/tomsugden/2009/12/writing_genuinely_reusable_fle.html
ÔÚÆóÒµµÄ´óÏîÄ¿À¾­³£ÒªÎªFlex Àà¿âдһϵÁпÉÖØÓõÄ×é¼þ¡£ÀíÂÛÉÏһЩÏàͬµÄ×é¼þ¿ÉÒÔÖظ´ÓÃÔÚ²»Í¬µÄÄ£¿éºÍ×ÓÄ£¿éµÄFlex »ò AIR ³ÌÐòÖУ¬´øÀ´Ò»ÖÂÐԺͿìËÙ¿ª·¢µÄºÃ´¦¡£È»¶øÔÚʵ¼ÊÖУ¬´æÔÚЩ´íÎóÓ÷¨ÏÞÖÆÁË×é¼þµÄÖØÓÃÐÔ¡£±¾ÎÄÕ½âÊÍÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ