Flex×é¼þ×Ô¶¯»ñÈ¡ÊäÈë½¹µã
ä¯ÀÀÆ÷¼ÓÔØswfºó£¬Flex×é¼þ×Ô¶¯»ñÈ¡ÊäÈë½¹µã¡£
1.ÔÚflexÖÐÉèÖý¹µã
as3 ´úÂë
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="initApp()">
<mx:Script>
[CDATA[
public function initApp():void {
application.focusManager.setFocus(nameInput);
}
]]
</mx:Script>
<mx:Label x="10" y="10" text="name"/>
<mx:Label x="10" y="36" text="password"/>
<mx:TextInput x="74" y="32" id="passwordInput"/>
<mx:TextInput x="74" y="8" id="nameInput"/>
<mx:Button x="178" y="62" label="Login"/>
</mx:Application>
2.ÔÚhtmlÖÐÉèÖý¹µã
jsp ´úÂë
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript"> &nbs
Ïà¹ØÎĵµ£º
¸ù¾Ý±ðÈËдÁËÀ࣬×Ô¼ºÓÖÔö¼ÓÁËÒ»²¿·Ö£¬Ìù³öÀ´·ÖÏí
/*»ñµÃÁ½¸öÈÕÆÚÖ®²î */
public static function getDateDiff(startDate:Date, endDate:Date):int
{
var diff:Number = (Number(endDate) - Number(startDate))/(3600000*24);
return diff;
}
/* »ñµÃÏÖÔÚÈÕÆÚ */
public static function getDate() ......
ͨ¹ýFlexÖеÄTimer¿ÉÊÇʵÏÖÊý×ÖʱÖÓµÄЧ¹û£¬ÆäЧ¹ûͼÈçÏ£º
ʵÏֵĴúÂëÈçÏ£º
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<!--[CDATA[
import mx.formatters.DateFormatt ......
Mxml×é¼þµÄ´ò¿ªºÍ¹Ø±ÕÌØЧ
openDuration="1000" openEasingFunction="Bounce.easeOut"
closeDuration="1000" closeEasingFunction="Bounce.easeIn"
//²Ëµ¥Í¸Ã÷Ч¹û
background-color:#000000;
background-alpha:0.1;
border-style:solid;
drop-shadow-color:#000000;
drop-shadow-enabled:yes;
//Õ¹¿ªËù ......
ʲôÊÇAsyncToken£¿¹Ù·½ÎĵµÊÇÕâÑùÃèÊöµÄ£º"Õâ¸öÀàÕë¶ÔÒì²½RPC²Ù×÷ÌṩÁËÒ»¸öÓÃÀ´ÉèÖöîÍâµÄ»òÕßÁîÅƼ¶Êý¾ÝµÄµØ·½¡£ËüÒ²ÔÊÐíÒ»¸öIResponder×÷Ϊһ¸ö¶ÀÁ¢µ÷Óñ»¸½¼Ó¡£Õâ¸öAsyncTokenÄܹ»ÔÚResultEventºÍFaultEventÖÐÓÃtokenÊôÐÔÀ´ÒýÓá£"
Èç¹ûÄ㶠......
flex ÕýÔò±í´ïʽѧϰ×ÊÁÏ
Ò»°ãÀ´Ëµ¸÷¸ö¿ª·¢»·¾³»òÕßÓïÑÔ¶ÔÓÚÕýÔò±í´ïʽµÄ
ʵÏÖ²»ÊÇÍêÈ«Ò»ÑùµÄ£¬µ«ÊDzî±ð¶¼·Ç³£Ï¸Î¢¡£AS3°´ÕÕECMA262±ê׼ʵÏÖÕýÔò±í´ïʽ£¬¸Ð¾õ°ïÖúÎĵµ¶ÔÕⲿ·Ö½éÉܵIJ»ÊǺܺ㬺ܶà¸ÅÄûÓн²Çå³þ£¬ÕâÀïÕÒµ½ÁËÒ»¸ö²»´íµÄѧϰ×ÊÁÏ£¬Èç¹û°ïÖúÎĵµÀïÃæÓп´²»¶®µÄ¿ÉÒԲο¼Ï£¡
½Ò¿ªÕýÔò±í´ïʽµÄÉñÃØÃæÉ´ ¹Ø ......