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

Flex no.2

--------------ex2_01_solution  选取时间-----------------------
 ...
   private function dateChangeHandler():void
   {
    // The Alert.show() message displays a static string plus the selected date in the startDate control
    Alert.show('You have selected ' + startDate.selectedDate.toDateString());
   }
... 
 <mx:DateChooser id="startDate"
     x="34" y="94" 
     showToday="true" 
     change="dateChangeHandler()"/>
--------------ex2_2_solution  选取时间-----------------------CalendarLayoutChangeEvent
protected function dateChangeHandler(event:CalendarLayoutChangeEvent):void
{
    if ((event.target.id == "endDate") && (startDate.selectedDate >  endDate.selectedDate))
    {
     Alert.show("Start date must be scheduled before end date.");
    }
}
....
 <mx:DateChooser id="startDate"
     x="34" y="94" 
     showToday="true" 
     change="dateChangeHandler(event)"/>
--------------ex2_3_solution  选取时间-----------------------addEventListener
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/halo"
      minWidth="1024" minHeight="768"
      creationComplete="initApp()">
...
   private function initApp():void
   {
    // Add the event listener using ActionScript instead of inline in the DateChooser instances
    startDate.addEventListener(CalendarLayoutChange


相关文档:

flex as3开源组件


flex项目和组件等
open-source project : Flex
Adobe APIs 
主要包含corelib, mappr, flickr, youtube及加密等类库. 
http://labs.adobe.com/wiki/index.php/ActionScript_3:resources:apis:libraries
as3awss3lib 
与 Amazon S3 交互的 ActionScript 3.0 类库 
http://code.google.com/p/as3 ......

Flex加载图片

Flex使用Loader和URLRequest加载本地图片示例:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import mx.core.UIComponent;
import mx.controls.Alert;
import flash.display.*;
i ......

Flex 右键菜单

MXML:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" fontSize="20" initialize="doinit()"   mouseOver="getMouseTarget(event)">
 <mx:ArrayCollection id="dgArray">
  <mx:Object pid="1" name="秦始皇" time="秦" />
&nbs ......

Flex组件(对话框)

java开发的总想尽快把flex和java结合起来,我也是,但这容易忽视一些基础的东西,刚把flex和java整合的第一步做完,忽然想在flex页面中弹出个对话框,不知道怎么写了,网上查了半天才出来.
原来这一句话就搞定了
Alert.show(content,title,flags,parent,closeHandle,iconClass,defaultButtonFlag);
以下是网上找到资料,供参考. ......

Flex:上传图片前预览

<?xml version="1.0" encoding="utf-8"?>
<!-- http://yecon.blog.hexun.com/31030831_d.html -->
<!-- http://www.slsay.com -->
<Application name="FileReference_load_test"
xmlns="http://ns.adobe.com/mxml/2009"
xmlns:mx="library:adobe/flex/halo"
xmlns:net= ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号