flex Óë .net ½»»¥¡¾»ùÓÚWebServiceµÄÊý¾Ý·ÃÎÊ¡¿
·ÏÂÃæ½éÉÜFlexÓë.NETµÄWebServiceµÄÊý¾ÝͨÐÅ֪ʶµã;°üÀ¨Á¬½ÓWebService£¬Ô¶³Ìµ÷ÓÃWebService·½·¨£¬¸øWebService·½·¨´«µÝ²ÎÊýµÈÏà¹Ø֪ʶµã¡£
¡¡¡¡<mx:WebServiceid="dataService"
¡¡¡¡¡¡¡¡wsdl="http://localhost/FlashFlex/DataWebService.asmx?wsdl"
¡¡¡¡¡¡¡¡useProxy="false">
¡¡¡¡¡¡¡¡<mx:operationname="HelloWorld" result="onSuccess(event)" fault="onFault(event)"/>
¡¡¡¡¡¡¡¡<mx:operationname="GetBook" fault="onFault(event)" result="onObjectSuccess(event)"/>
¡¡¡¡</mx:WebService>
·wsdlÊôÐÔÖ¸¶¨µ½Òª·ÃÎʵÄWebServiceµÄwsdlµØÖ·¼È¿É£¬ÆäÖж¨ÒåÁËÁ½¸ö²Ù×÷±êÇ©(<mx:operation>)£¬·Ö±ð¶ÔÓ¦ÓÚWebServiceÖж¨ÒåµÄWebMethod·½·¨¡£resultÊôÐÔ±ê¼Ç·ÃÎÊWebService·½·¨³É¹¦ºóµÄ´¦Àíº¯Êý£»faultÔòÏà·´£¬Ö¸¶¨ÓÚ·ÃÎÊʧ°ÜµÄ´¦Àíº¯Êý¡£ÒÔÉÏÁ½¸ö<mx:operation>¶ÔÓ¦ÓÚWebServiceµÄWebMethod·½·¨ÈçÏ£º
1¡¡¡¡///<summary>
2¡¡¡¡///·µ»Ø×Ö·û´®
3¡¡¡¡///</summary>
4¡¡¡¡///<returns></returns>
5¡¡¡¡[WebMethod]
6¡¡¡¡publicstringHelloWorld()
7¡¡¡¡{
8¡¡¡¡¡¡¡¡return"HelloWorld";
9¡¡¡¡}
10
11¡¡¡¡///<summary>
12¡¡¡¡///·µ»ØÒ»¸ö¼òµ¥¶ÔÏó
13¡¡¡¡///</summary>
14¡¡¡¡///<returns></returns>
15¡¡¡¡[WebMethod]
16¡¡¡¡publicBookGetBook()
17¡¡¡¡{
18¡¡¡¡¡¡¡¡returnnewBook
19¡¡¡¡¡¡¡¡{
20¡¡¡¡¡¡¡¡¡¡¡¡Id=1,
21¡¡¡¡¡¡¡¡¡¡¡¡Name="Èý¹úÑÝÒå",
22¡¡¡¡¡¡¡¡¡¡¡¡Author="ÂÞ¹áÖÐ",
23¡¡¡¡¡¡¡¡¡¡¡¡Price=100
24¡¡¡¡¡¡¡¡};
25¡¡¡¡}
·ÈçÉϱãÊÇWebService·½·¨¶¨ÒåºÍÔÚFlexµÄ¿Í»§¶Ë(mxml)ͨ¹ý<mx:WebService>±êÇ©À´·ÃÎÊWebServiceµÄÍêÕûÁ÷³Ì£¬ÏÂÃæÎÒÃÇÀ´¿´¿´ÔÚFlexµÄ¿Í»§¶ËÔõôȥµ÷ÓÃWebServiceËù¶¨ÒåµÄ·½·¨£º
1<mx:Script>
2¡¡¡¡<!--[CDATA[
3¡¡¡¡¡¡¡¡importmx.controls.Alert;
4¡¡¡¡¡¡¡¡importmx.rpc.events.FaultEvent;
5¡¡¡¡¡¡¡¡importmx.rpc.events.ResultEvent;
6¡¡¡¡¡¡¡¡
7¡¡¡¡¡¡¡¡/**
8¡¡¡¡¡¡¡¡¡¡*ÏòWebService·¢ÆðÇëÇó--µ÷ÓÃHelloWorld·½·¨£¬dataServiceΪ<mx:WebService>µÄid
9¡¡¡¡¡¡¡¡¡¡**/
10¡¡¡¡¡¡¡¡internalfunctiononRequest():void
11¡¡¡¡¡¡¡¡{
12¡¡¡¡¡¡¡¡¡¡¡¡dataService.HelloWorld();
13¡¡¡¡¡¡¡¡}
14¡¡¡¡¡¡¡¡
15¡¡¡¡¡¡¡¡/**
16¡¡¡¡¡¡¡¡¡¡*ÇëÇó³
Ïà¹ØÎĵµ£º
ÔÎĵØÖ·£ºhttp://www.adobe.com/cn/devnet/flex/articles/itemrenderers_pt3.html
ÔÚ±¾ÏµÁÐµÄµÚ 2 ²¿·ÖÖÐ, ÎÒÏòÄúչʾÁËÈçºÎʹÓà MXML ºÍ ActionScript ´´½¨Íⲿ itemRenderer¡£ÔÚÎÒÓùýµÄʾÀýÖÐ, ÓÐÒ»¸öµ÷¶È×Ô¶¨Ê¼þ BuyBookEvent µÄ Button£ÕâÑùÓ¦ÓóÌÐò¿ÉÒÔ¶ÔËü×÷³öÏìÓ¦¡£±¾ÎĽøÒ»²½ÌÖÂÛÓë itemRenderer µÄͨÐÅ¡£
ÎÒ ......
ÔÎĵØÖ·£ºhttp://www.adobe.com/cn/devnet/flex/articles/itemrenderers_pt4.html
itemRenderer ×îÉó¤ÓëÓ¦ÓóÌÐòµÄÓû§Í¨ÐÅ¡£ÓÐʱͨÐźܼòµ¥, Ö»ÊÇÏÔʾһ¸öÃû³Æ£»ÓÐʱ»áʹÓøü¾«ÖµÄÑÕÉ«£»ÓÐʱ¾ßÓн»»¥ÐÔ¡£
itemEditor ÊÇÕæÕýµÄ½»»¥¿ØÖÆ, µ«ËüÃDz»ÊDZ¾ÎĵÄÖص㡣ÔÚÕâЩʾÀýÖÐ, ÎÒ½«ÏòÄúչʾ¸ù¾ÝÊý¾Ý±¾Éí»òÓû§²Ù×÷¸ü¸Ä¿ ......
µÚÒ»ÖÖ£ºÐÞ¸ÄÏÂÔؽø¶ÈµÄÎÄ×ÖΪÖÐÎÄ
½¨Á¢À©Õ¹ÖÁ mx.preloaders.DownloadProgressBar µÄÒ»¸öÀࣺ
01.package myDownPro
02.{
03.import mx.preloaders.DownloadProgressBar;
04.
05.public class myDownProBar extends DownloadProgressBar
06.{
07. public function myDownProBar()
08. {
09. //TODO: impl ......
· FlexÖÐÓ¦ÓóÌÐò¡¢Ä£¿éÖ®¼ä²ÎÊý´«µÝÒ»°ãÓÐÈýÖÖ·½Ê½:
· 1.ͨ¹ýURLЯ´ø²ÎÊý½øÐд«µÝ
· 2.ͨ¹ýʼþ½øÐд«µÝ
· 3.ʵÏÖ½Ó¿Ú½øÐд«µÝ
· ÆäÖÐURL´«µÝ²ÎÊýʱ£º
· ApplicationÖ®¼äºÍModuleÖ®¼äÊÇÓÐÇø±ðµÄ ......
´ÓÍøÉÏתÔصģ¬»¹Ã»Ê±¼ä¼ø¶¨£¬ÔݼǼÔÚÕâÀï
http://blog.csdn.net/zyjasp/archive/2008/05/16/2452175.aspx
µÚÒ»²½:½¨Á¢¼ÓÔØÀà[CtmObjLoader],´ËÀà¿ÉÒÔ¼ÓÔØÎļþÀàÐÍ [ͼƬÎļþ»òswfÎļþ]
package
{
import flash.display.DisplayObject;
import flash.display.Loader;
import flash.events.*;
import flash. ......