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

Flex 学习笔迹之1 flex的事件(1)

Adobe Flex 3 Help > Flex Programming Elements > Using Events
Adobe Flex 3 Help
 
Flex Programming Elements / Using Events
Using events
Using events in Flex is a two-step process. First, you write a function or class method, known as an event listener or event handler, that responds to events. The function often accesses the properties of the Event object or some other settings of the application state. The signature of this function usually includes an argument that specifies the event type being passed in.
The following example shows a simple event listener function that reports when a control triggers the event that it is listening for:
<?xml version="1.0"?>
<!-- events/SimpleEventHandler.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initApp();">
<mx:Script><![CDATA[
import mx.controls.Alert;
private function initApp():void {
b1.addEventListener(MouseEvent.CLICK, myEventHandler);
}
private function myEventHandler(event:Event):void {
Alert.show("An event occurred.");
}
]]></mx:Script>
<mx:Button id="b1" label="Click Me"/>
</mx:Application>
As you can see in this example, you also register that function or class method with a display list object by using the addEventListener() method.
Most Flex controls simplify listener registration by letting you specify the listener inside the MXML tag. For example, instead of using the addEventListener() method to specify a listener function for the Button control's click event, you specify it in the click attribute of the <mx:Button> tag:
<?xml version="1.0"?>
<!-- events/SimplerEventHandler.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script><![CDATA[
import mx.controls.Alert;
private function myEventHandler(event:Event):void {
Alert.s


相关文档:

Flex 实现鼠标手势 无码 );

声明:自己想的、写的东西,转载请注明出处; 不要向我要代码; from CSDN ID: wander000
目的:在做小程序时,显示一些重要的数据如帐号密码等,不想让别人直接看到,在指定组件上按规定好的轨迹晃动鼠标才显示。
问题:一、直接打开数据库不就看到明码了?二、怎么判断鼠标轨迹的形状?
解决:一、数据库存取时用上加 ......

FLEX 与现有开发语言的通信全面解析


以下介绍几种最为常见和实用的FLEX与现有开发语言通信的方法:
1.C#
2.PHP
3.JAVA
1.Flex与C#通信(.net开发中常用)
Flex端代码:
   public static function SendMessage(objXML:XML,objResultHandle:Function):void
   {
        var objHttpService:HTT ......

9本经典Flex As电子书


ActionScript 3.0 语言和组件参考

Foundation ActionoScript3.0 动画

Learning Flex3

AS3 Cheat Sheets

Flex Frameword Diagram

Rich Internet Applications With Adobe Flex & Java
......

flex 4插件版安装没有视图模式原因之一

这几天要学一下flex开发,但是安装的是eclipse插件版的,可是安装好后发现没有可视化的编辑视图,最后发现其实是因为flex的mxml文件的打开方式是使用的spket编辑器打开的,所以没有可视化编辑视图,于是吧spket卸载了。就好了。记录一下,希望能帮到别人,也让自己记住 ......

FABridge教程(Flex+Ajax)

一.通过js访问Flex组件
    1.准备工作。先建立Flex工程 :fademo,并放置一个文本框:txtName。做完后代码应该类似于这个样子:
view plaincopy to clipboardprint?
·········10······· ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号