Flex学习 为一个事件建立多个监听
方法一:
<?xml version="1.0"?>
<!-- events/MultipleEventHandlersInline.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script><![CDATA[
private function submitForm(e:Event):void {
// Handle event here.
}
private function debugMessage(e:Event):void {
// Handle event here.
}
]]></mx:Script>
<mx:Button id="b1"
label="Do Both Actions"
click='submitForm(event); debugMessage(event);'
/>
</mx:Application>
方法二:
<?xml version="1.0"?>
<!-- events/MultipleEventHandlersAS.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="createHandlers(event)">
<mx:Script><![CDATA[
public function createHandlers(e:Event):void {
b1.addEventListener(MouseEvent.CLICK, submitForm);
b1.addEventListener(MouseEvent.CLICK, debugMessage);
}
private function submitForm(e:Event):void {
// Handle event here.
}
private function debugMessage(e:Event):void {
// Handle event here.
}
]]></mx:Script>
<mx:Button id="b1" label="Click Me"/>
</mx:Application>
相关文档:
http://www.cnblogs.com/beniao/archive/2009/01/12/1373921.html
127.0.0.1是回送地址,指本地机,一般用来测试使用。回送地址(127.x.x.x)是本机回送地址(Loopback Address),即主机IP堆栈内部的IP地址,主要用于网络软件测试以及本地机进程间通信,无论什么程序,一旦使用回送地址发送数据,协议软件立即返回之,不进 ......
10 个FLex MVC框架
AdobeFlex及相关技术正成为RIA领域的主流。虽然Flex社区的规模还远比不上Java或Microsoft平台,但它正在FlexRIA开发者们的栽培下稳健地成长。许多开源开发框架也因此被创造出来:
Cairngorm(下载)
Cairngorm是最老也最成熟的Flex框架。它现在由Adobe拥有并开源,而且被Adobe的RIA顾问服 ......
用的是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 ......
一、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 {
countriesSer ......