易截截图软件、单文件、免安装、纯绿色、仅160KB

flex实现读取本地文件

import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
private var loader:URLLoader = new URLLoader();
private var request:URLRequest = new URLRequest("a.txt");
       
private function initComplete():void
   {
      loader.load(request);
      loader.addEventListener(Event.COMPLETE, onComplete);           
   }
private function onComplete(event:Event):void
  {
      var loader:URLLoader = event.target as URLLoader;
      if (loader != null)
      {
           trace(loader.data);
      }
      else
      {
           trace("loader is not a URLLoader!");
       }
  }
之所以要读取本地文件,是因为我没有安装FlexDataService没有发配置WebService的WSDL所以从文本中把它读出来,赋值给WebService的wsdl属性,但是我看FlexDeveloperGuid上有一句话
You configure destinations in the Flex services configuration file
or a file that it includes by reference.
这好像是说可以不用FDS,但是有不知道怎么弄,只好用这个不安全的方法,其实我们可以把字符串加密....呵呵
对了这样写的时候需要注意一点是给WebService的wsdl指定了之后还需要调用一个loadWSDL()方法,要不然不管用哦!


相关文档:

flex向子窗口传值(很简单的办法)

var login:infoChange=infoChange(PopUpManager.createPopUp( this, infoChange , true));
     login.x=250;
     login.y=150;
     login.userid.text=dg.selectedItem.aa;
     login.username.text=dg.selectedItem.bb;
  ......

FLEX 实用属性详解

flex各组件对应的样式属性上2007-10-2515:47各组件对应的样式属性
themeColor主题颜色:如果对色彩样式配置不想过多的去设置的话,themeColor是一个选择。它可
以让你选择一种基本色彩,然后组件的边框,外观等色彩将会以此色彩为基础构成一组缺省的样式,组件均可使用此样式属性。
Application组件样式属性
background ......

避免Flex RSL重复load 提高module加载性能

本文编译后的补丁下载链接 http://download.csdn.net/source/1908278
多模块应用,每加载一个模块都会重复加载模块所使用的RSL,现在增加一个
    
    private static var  loadedRSLs:Dictionary = new Dictionary(); 来保存是否已加载
mx.core.RSLListLoader
//////////////// ......

通过页面传递参数到flex中的几种方法

1.在<Object>和<embed>中设置flashVars参数,例如:
<object id=’mySwf’ classid=’clsid:D27CDB6E-AE6D-11cf-96B8-444553540000′ codebase=’http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab’ height=’100%’ width=’100%&rs ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号