as\flex ÖÐÌí¼ÓʼþaddEventListener()ʱ´«µÝ²ÎÊý
/**
* @author:ycccc8202
* @ÓÃ;:×¢²áʼþ½øÐд«µÝ²ÎÊýµÄ´úÀíÀà
* @date:2007.8.26
* @example:
* import com.ycccc.utils.JEventDelegate
stage.addEventListener(MouseEvent.MOUSE_DOWN,JEventDelegate.create(mouseDownHandler,"a","b"));
function mouseDownHandler(e:MouseEvent,...arg) {
trace(e)
trace(arg)
}
*/
package com.projectstateview.comm.method
{
import flash.events.Event;
public class JEventDelegate
{
public function JEventDelegate()
{
}
public static function create(f:Function,... arg):Function
{
return function(e:Event):void
{
f.apply(null,[e].concat(arg));
}
}
public static function toString():String
{
return "Class JEventDelegate";
}
}
}
Ïà¹ØÎĵµ£º
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.collections.ArrayCollection;
......
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/09/04/adding-animations-and-effects-to-flex-tool-tips/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertic ......
1¡¢as3ebaylib
http://code.google.com/p/as3ebaylib/
2¡¢as3youtubelib
http://code.google.com/p/as3youtubelib/
3¡¢as3flickrlib
http://code.google.com/p/as3flickrlib/
4¡¢Yahoo ASTRA Flash Components
http://developer.yahoo.com/flash/astra-flash/
5¡¢facebook-as3
http://code.google.com/p/faceboo ......
ExternalInterface.callµÄÎÊÌâ
ÇëÁôÒâÒÔÏÂÇé¾°£¬ÒªÀûÓÃÍⲿӦÓóÌÐòµ¯³öÎļþÑ¡Ôñ´°Ì壬²¢·µ»ØËùÑ¡µÄÎļþ·¾¶¡£
ʹÓÃExternalInterface.callÀ´ÊµÏÖ£¬µ±Óû§60Ãë(FlexÒѾÉèÖÃ×µÄµÈ´ýʱ¼ä)ÄÚδÄܹ»Íê³ÉÎļþÑ¡Ôñ»áµ¯³ö"1502"µÄ´íÎó£¬ÑÏÖØÓ°ÏìÓû§ÌåÏÖ¡£
ËùÒÔ£¬Ò»Ð©±È½ÏºÄʱµÄ²Ù×÷(³¬¹ý60s)£¬»òÎÞ·¨È·¶¨ºÎʱµ÷ÓÃÍê³ÉµÄ· ......
<![CDATA[
FlexÖеļüÅÌʼþ
ÒªÔÚFlexÖÐÏìÓ¦¼üÅÌÊäÈ룬ֻÐè×¢²ákeyDownʼþ¼´¿É¡£
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" keyDown="OnKeyDown(event)">
<mx:Script>
......