¹ØÓÚFlexµÄʼþ²¶»ñÎÊÌ⣬ÇëÐÖµÜÃÇ°ïÎÒ½â¾ö£¬Ð»¹ý~~~~
ÎÊÌâÊÇÕâÑùµÄ£¬ÎÒ×Ô¼ºÐ´ÁËÒ»¸ömodelÀ࣬Ëü¼Ì³Ð×ÔEventDispatcher£¬È»ºóÔÚÖ÷mxmlÖзÅÖÃÒ»¸öbuttonºÍÒ»¸öpanel£¬ÒªÇóµã»÷buttonºó£¬ÔÚbuttonµÄÏìÓ¦º¯ÊýÖÐnew ³ömodelµÄ¶ÔÏóm£¬È»ºóÓÃm·¢ËÍMouseEvent.CLICKÏûÏ¢£¬panelµ±È»»áÔÚÕû¸ö³ÌÐòµÄ³õʼ»¯Ê±Ìí¼ÓÕâ¸öÏûÏ¢µÄ¼à¿ØÆ÷£¬Èç¹ûpanel½ÓÊÕµ½Õâ¸öÏûÏ¢£¬ÔòÌáʾpanel clicked¡£
µ«ÊÇÏÖÔÚpanel²»ÄܽÓÊÕµ½Õâ¸öÏûÏ¢£¬ÉÔ΢¸Ä±ä³ÌÐòÈçÏÂ:
1.ÔÚmÉÏÌí¼ÓÏûÏ¢¼à¿ØÆ÷£¬mÄܽÓÊÕÕâ¸öÏûÏ¢;
2.ÔÚÖ÷mxmlÖÐËæÒâ·ÅÖÃÒ»¸ö¿Ø¼þ£¬ÀûÓÃËü·¢ËÍÏûÏ¢£¬panelÄܽÓÊÕ¡£
ÏÖÔÚÎÒµÄÒªÇóÊÇʹÓÃm¶ÔÏó·¢ËÍÏûÏ¢£¬È»ºópanelÀ´½ÓÊÕÏûÏ¢¡£ Çë¸÷λ´ó´óÏàÖú£¡£¡£¡£¡Íò·Ö¸Ð¼¤~~~~
ÏÂÃæÊÇ´úÂë:
model.as
Java code:
package
{
import flash.events.EventDispatcher;
public class model extends EventDispatcher
{
public function model()
{
}
}
}
test.mxml
XML code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="initApp()" xmlns:local="*">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import flash.events.Event;
inte
Ïà¹ØÎÊ´ð£º
ÈçÌâ
http://riashanghai.com/zh-hant/node/48
²Î¿¼Ò»Ï°ɡ£
±ØÐë×Ô¼ºÐ´preloader
ÎÒÖ¸µÄÊÇÉèÖà preloaderµÄ±³¾°É«
preloader ÔçÒѾдºÃ
Â¥ÉϽ¨Òé²»´í£¬Ö»ÊÇÏë°ÑpreloaderµÄ±³¾°×ö³É½¥±äµÄ
......
flexµÄaddEventListener ÀïÃ溯Êý²»ÄÜ´ø²ÎÊý°¡¡£
ÎÒÏÖÔڵŦÄÜÊÇÕâÑù¡£¡£
ÔÚ·þÎñÆ÷¶ËµÃµ½Ò»¸öArrayCollection ,È»ºó±éÀúÕâ¸öÊý×飬£¬È»ºóÔÚ¶¯Ì¬´´½¨button,buttonµÄclick¸ù¾ÝArrayCollection ÀïÃæ¶ÔÏóµÄid,ä¯ÀÀ¶ÔÏ ......
1.È«ÈÕÖÆÕý¹æ±¾¿Æ¼ÆËã»úÏà¹Øרҵ±ÏÒµ£¬Á½ÄêÒÔÉÏÏà¹Ø¹¤×÷¾Ñ飻
2.ÊìÁ·Ê¹ÓÃAction Script 3.0ÔÚFlexBuilder»·¾³Ï¿ª·¢£¬ÊìÁ·Ê¹ÓÃFlexÓëAIRµÄ±ê×¼×é¼þ£»
3.Á˽âJavaScript¡¢CSS¡¢Ajax £»
4.¾ßÓÐÁ¼ºÃµÄ¾´Òµ¾«ÉñºÍÍŶ ......
BlazeDS±¨´íÈçͼ£¬Ë°ï¿´¿´
XMLת»»Òì³££¬Äã¿´¿´ÄãµÄXML
ûÕÒµ½ÉùÃ÷µÄÔªËØmodel, Ó¦¸ÃÊÇxmlÀïÃæдµÄÓÐÎÊÌâ
»»³Éblazeds-bin-4.0.0.15165°æ±¾¾ÍºÃÁË£¬ËäÈ»ÊÇnightly build°æ£¬µ«¹ÜÓ𡣡
¸úblazeds°æ±¾ÓÐ ......
TestSearch.mxml(mx:Application):
<mx:Button label="search" click="Search.showSearchWindow(this)"/>
Search.mxml(mx:TitleWindow):
private static var search:Search = new Sear ......