flex ×Ô¶¨Òå½ø¶ÈÌõ
µÚÒ»ÖÖ£ºÐÞ¸ÄÏÂÔؽø¶ÈµÄÎÄ×ÖΪÖÐÎÄ
½¨Á¢À©Õ¹ÖÁ 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: implement function
10. super();
11. downloadingLabel="ÕýÔÚÏÂÔØÖÐ...";
12. initializingLabel="ÕýÔÚ³õʼ»¯ÄÚÈÝ...";
13. }
14.}
15.}
¸´ÖÆ´úÂë
È»ºóÔÚÐÞ¸Ä preloader ΪÄ㽨Á¢µÄÕâ¸öÀࣺ
01.<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" preloader="myDownPro.myDownProBar" layout="absolute">
02.<mx:Text text="³ÌÐò½ø¶ÈÌõ²âÊÔ" x="37" y="71"/>
03.</mx:Application>
¸´ÖÆ´úÂë
µÚ¶þÖÖ£º¸²Ð´ DownloadProgressBar ÀàµÄ preloader£¬¿ÉÒÔÔÚÆäÖмÓÈëÄã×ÔÒÑϲ»¶µÄ±êÇ©»òÕßͼÏñ
01.package myDownPro
02.{
03.import mx.preloaders.DownloadProgressBar;
04.import flash.display.Sprite;
05.import flash.events.ProgressEvent
06.import flash.events.*
07.
08.import flash.text.TextField;
09.import mx.events.*;
10.public class myDownProBar2 extends DownloadProgressBar
11.{
12. public var msg:TextField
13. public function myDownProBar2()
14. {
15. super();
16. msg=new TextField()
17. msg.x=200
18. msg.y=200
19. addChild(msg)
20. }
21. override public function set preloader(s:Sprite):void{
22. s.addEventListener(ProgressEvent.PROGRESS,prog)
23. s.addEventListener(Event.COMPLETE,ecom)
24. s.addEventListener(FlexEvent.INIT_COMPLETE,flInC)
25.s.addEventListener(FlexEvent.INIT_PROGRESS,flIn)
26. }
27.private function prog(e:ProgressEvent):void{
28.msg.text=String(int(e.bytesLoaded/e.bytesTotal*100))+" %";
29.}
30.private function ecom(e:Event):void{
31.msg.text="Íê³ÉÁË£¡£¡£¡£¡"
32.}
33.private function flInC(e:FlexEvent):void{
34.msg.text="³õʼ»¯Íê±Ï£¡"//³õʼÍêºóÒªÅÉDz Complete ʼþ£¬²»È»»áÍ£ÔÚÕâÀ²»»á½øÈë³ÌÐò»ÃæµÄ
35.dispatchEvent(new Event(Event.COMPLETE))
36.}
37.private function flIn(e:FlexEvent):
Ïà¹ØÎĵµ£º
ÔÚ.netÖУ¬ÎÒÃÇ¿ÉÒÔÓÃ"²ã"À´²¼¾Ö£¬ÊµÏֿؼþµÄÉÏÏÂÖصþ¡£
ÔÚflexÀïòËÆÊÇûÕâ¸ö¸ÅÄîµÄ£¬flex°´Ä¬ÈÏÊÇÈÏΪÏȶ¨ÒåµÄÔÚϲ㣬ºó¶¨ÒåµÄÔÚÉϲ㣬²»ÂÛÊÇÊÂÏȶ¨ÒåµÄ¿Ø¼þ£¬»¹ÊÇ´úÂ붯̬Éú³ÉµÄ¿Ø¼þ£¬¶¼ÊÇÏÈÀ´¾ÓÏ¡£
µ«ÊÇflexÓÐ×Ô¼ºµÄµ÷Õûº¯Êý£¬×ÜËãÊÇÈÃÎҲ鵽ÁË¡£
ÈÝÆ÷Ãû.setChildIndex(displayObject,int)¾ÍÊǵ÷ÕûÕâ¸öÈÝÆ÷ÏÂËùÓп ......
ÔÚcygwinÏÂ×Ô¼ºÐ´Á˸ö»ã±àÆ÷£¬Ê¹ÓÃflexºÍbison·Ö±ð×ö´Ê·¨ºÍºÍÓï·¨·ÖÎö¡£ÔÚcygwinÏ¿ÉÒÔÔËÐУ¬µ«ÊÇ»ã±àÆ÷Òª×÷ΪÕû¸ö¹¦ÄܵÄÒ»²¿·Ö£¬¾Í²»µÃ²»°ÑËü·â×°ÆðÀ´£¬¸øÍⲿÌṩ½Ó¿Ú¡£Ï±ߴó¸Å½²Ò»ÏÂÒÆÖ²µÄ¹ý³Ì¼°Óöµ½µÄÎÊÌâ¡£
ÔÚvcÏÂн¨win32¿ØÖÆ̨ӦÓóÌÐò£¬Èç¹ûÄãµÄbisonÔ´´úÂëÖаüº¬mainº¯Êý½¨Ò»¸ö¿Õ¹¤³Ì¾ÍÐÐÁË£»
ÒªÔÚWindows϶ ......
PopUpEffect.as
package
{
import flash.display.DisplayObject;
import mx.core.IFlexDisplayObject;
import mx.effects.Blur;
import mx.events.TweenEvent;
import mx.managers.PopUpManager;
public class PopUpEffect
{
public function PopUpE ......
1. ÕûÌåµÄ½á¹¹·Ö²¼£º
¸÷Ä£¿éʹÓÃModuleÀ´»®·Ö£¬Ã¿¸öÄ£¿éµÄÒ³Ãæ¼°ÆäÏà¹ØµÄ×é¼þÔªËض¼ÊÇʹÓÃComponentÀ´»®·Ö£»
Ä£¿éµÄÇл»Ê¹ÓüÓÔصķ½Ê½£¬Ä£¿éÄÚ²¿µÄÇл»Ê¹ÓÃÒ³ÃæÌøתµÄ·½Ê½£»
¼¼ÊõÎÊÌ⣺ģ¿éµÄÇл»ÓëÒ³ÃæµÄÇл»µÄ¹ý³Ì£¡
ModuleLoaderÓëModuleManagerÖ®¼äµÄÈ¡ÉᣬѡÔñÁ˺óÕߣ¬¿É¿ØµÄ¸ü¶à£¬µ«ÊÇÄ¿Ç°µÄÓ°Ïì²¢²»´ó£¡
¹ØÓÚM ......