flex 加载的几个类
var loader:URLLoader = new URLLoader();loader.addEventListener(ProgressEvent.PROGRESS, handleProgress );event:ProgressEvent event.bytesLoaded/event.bytesTotalvar streamer:URLStream = new URLStream( );streamer.addEventListener( ProgressEvent.PROGRESS, handleProgress );streamer.load(new URLRequest("example.txt"));var streamer:URLStream = URLStream( event.target );streamer.bytesAvailable/read*** var request:URLRequest = new URLRequest("process.cfm");var variables:URLVariables = new URLVariables();request.data = variables;sendToURL(request);//open a new urlnavigateToURL(request, "_blank" );//return valuevar variables:URLVariables = new URLVariables( );variables.method = "getProductDetail"variables.productId = 2;request.data = variables;loader.dataFormat = DataFormat.VARIABLES;loader.addEventListener(Event.COMPLETE, handleComplete);loader.load(request);var loader:URLLoader = URLLoader( event.target );loader.data.productId long start = System.currentTimeMillis(); long initMem=Runtime.getRuntime().totalMemory(); ...... long end = System.currentTimeMillis(); System.out.println("usedTime:"+(end - start)/1000); long freeMem=Runtime.getRuntime().freeMemory(); System.out.println("usedMem:"+(initMem-freeMem)/(1024*1024));本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/rubyzhudragon/archive/2010/03/14/5378610.aspx