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

Flex与后台交互的4种方法

一、HTTPService
程序代码:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initializeHandler(event)">
<mx:Script>
<!--[CDATA[
private function initializeHandler(event:Event):void {
countriesService.send();
}
private function changeHandler(event:Event):void {
statesService.send();
}
]]>
</mx:Script>
<!-- 载入纯静态的xml数据 -->
<mx:HTTPService id="countriesService" url="http://www.rightactionscript.com/states/xml/countries.xml" />
<!-- 载入由php生成的xml数据 -->
<mx:HTTPService id="statesService" url="http://www.rightactionscript.com/states/xml/states.php">
<!-- 以下标签就是要发送到服务端的数据了,可以这样理解:有一个名为country的变量,它的值为花括号{}里的内容 -->
<mx:request>
<country>{country.value}</country>
</mx:request>
</mx:HTTPService>
<mx:VBox>
<!-- 此控件的数据由第一个<mx:HTTPService/>控件接收的内容提供,并且由这个ComboBox控制着第二个ComboBox所要显示的内容 -->
<mx:ComboBox id="country" dataProvider="{countriesService.lastResult.countries.country}"
change="changeHandler(event)" />
<!-- 下面的ComboBox已经绑定了{statesService.lastResult.states.state},随它的数据改变而改变 -->
<mx:ComboBox dataProvider="{statesService.lastResult.states.state}" />
</mx:VBox>
</mx:Application>  
二、URLLoader
程序代码:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initializeHandler(event)">
<mx:Script>
<!--[CDATA[
private var _countriesService:URLLoader;
private var _statesService:URLLoader;
private function initializeHandler(event:Event):void {
_countriesService = new URLLoader();
_countriesService.addEventListener(Event.COMPLETE, countriesCompleteHandler);
_countriesService.load(new URLRequest("http://www.rightactionsc


相关文档:

Flex单元测试工具(FlexMonkey)


Testing Flex applications with FlexMonkey 1.0
Without automation, testing the UI components of your Flex
application can be tedious and time consuming. Adobe includes an
automation framework in Flex to enable developers to create automated
tests that operate at the GUI level. FlexMonkey
1.0 i ......

Adobe Flex 编码规范

Adobe Flex 编码规范 收藏
该文档中创建的实例是基于DClick 的工作方法,Java 编码约定和Adobe Flex SDK 中的约定。
二、文件:
2.1 文件扩展名  
MXML 代码:.mxml  
ActionScript 代码:.as  
CSS 代码:.css
2.2 文件名不能包含空格、标点和特殊符号  
ActionScr ......

flex 客户端缓存 module swf(转)

flex或者flash客户端的缓存,并不是指浏览器的缓存,浏览器的缓存在一定时间后会过期,先作此声明。
使用flex或者flash开发出来的网站最大的问题就是swf文件过大,国内网速有限,导致加载时间过长,这样会丢失很多潜在的客户。
flex使用RSL技术,可以解决框架的缓存与共享,很大程度的解决了加载问题。但是如果项目过大, ......

flex通过blazeds与java实现增删改查

用的是MySQL数据库。
1,建一个userdb库,再建userinfo表,字段:id(int),username(varchar),password(varchar)。
create database userdb;
use userdb;
create table userinfo(
id int(10) not null auto_increment,
username varchar(20),
password varchar(20),
primary key(id));
2,DBConnection.jav ......

关于跳过flex的sandbox实现访问本地资源的解决方案

需求: 
开发flex的过程中遇到一个问题。flex的项目需要在客服端显示一个局域网类的一台服务器的文件目录结构,并且要能够点击访问。
预想:
flex在以前的版本里面没有file类,这个可以用java代码在后台进行处理,生成xml文件。前台的flex到相应目录下面读取数据即可。
困难:
flash被下载到客服端,有严格的安全 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号