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