Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÄÚ´æÐ¹Â¶½â¾öÖ®µÀ

£¨1£©Event Listeners
                Listening to parent objects does cause memory leaks
                e.g.
      & ......

flex ÖÐGMLת»»

package org.openscales.core.format
{
 import flash.utils.getQualifiedClassName;
 import flash.xml.XMLNode;
 import org.openscales.core.Util;
 import org.openscales.core.feature.Feature;
 import org.openscales.core.geometry.Collection;
 import org.openscales.core. ......

¼´Ê±±¨±íFlex¹¤¾ßÌõʹÓÃÖ®µ÷ÕûÁпí

ÈóǬ¼´Ê±±¨±í²»½ö¿ÉÒÔͨ¹ýÍÏ×§µÄ·½Ê½ÇáËÉʵÏÖ¸÷ÖÖ³£¼ûÀàÐ͵Äweb±¨±íÖÆ×÷£¬¶øÇÒÔÚÕ¹ÏÖ±¨±íʱ»¹ÌṩÁËÁé»îµÄFlex¹¤¾ßÌõ£¬¿ÉÒÔͨ¹ýFlex¹¤¾ßÌõʵÏÖµ÷ÕûÁÐ¿í¡¢ÅÅÐòºÍ¹ýÂËÏÔʾÊý¾ÝµÈ¹¦ÄÜ¡£ÏÂÃæ¾ÍÏȼòµ¥µÄ½éÉÜÒ»ÏÂÈçºÎʹÓÃFlex¹¤¾ßÌõµ÷ÕûÁÐ¿í¡£ ÎÒÃÇÉè¼ÆÒ»¸ö¼òµ¥ÀàÐ͵ı¨±í£¬±¨±í²é¿´ÈçÏÂͼ ÔÚÉÏͼÖÐÎÒÃÇ¿ÉÒÔ¿´µ½£¬µ±¹ÍÔ±µØÖ·¹ý³ ......

flex ¿Í»§¶Ë·ÖÒ³

Main.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:file="file.*">
<mx:Script>
<!--[CDATA[
import simPager.PagerEvent;
import mx.collections.ArrayCollection;
[Bindable]
priv ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ