FlexÖнø¶ÈÌõµÄʹÓÃ
ÑùÕÅͼ£º
ʹÓ÷½·¨£º
ÉèÖÃApplication±êÇ©µÄpreloaderΪ MyComponent.MyDownloadProgressBar
<mx:Application preloader="MyComponent.MyDownloadProgressBar" >
ÏÂÃæÊÇMyDownloadProgressBar.asµÄ´úÂ룺
package MyComponent
{
import flash.display.*;
import flash.events.*;
import flash.filters.BitmapFilterQuality;
import flash.filters.BlurFilter;
import flash.geom.Matrix;
import flash.net.*;
import flash.text.TextField;
import flash.utils.*;
import flash.system.Capabilities;
import mx.events.*;
import mx.preloaders.*;
public class MyDownloadProgressBar extends Sprite implements IPreloaderDisplay
{
[Embed(source="logo.png", mimeType="application/octet-stream")]
public var _loadingLogo:Class;
private var dpbImageControl:Loader;
private var _barSprite:Sprite;
private var progressText:TextField;
private var ProgressBarSpritIsAdded:Boolean = false;
public function MyDownloadProgressBar() {
super();
}
// Specify the event listeners.
public function set preloader(preloader:Sprite):void {
//Listen for ÕýÔÚÏÂÔØ
preloader.addEventListener(ProgressEvent.PROGRESS, handleProgress);
//Listen for ÏÂÔØÍê³É
preloader.addEventListener(Event.COMPLETE, handleComplete);
//Listen for ÕýÔÚ³õʼ»¯
preloader.addEventListener(FlexEvent.INIT_PROGRESS, handleInitProgress);
//Listen for ³õʼ»¯Íê³É
preloader.addEventListener(FlexEvent.INIT_COMPLETE, handleInitComplete);
}
// Initialize the Loader control in the override
// of IPreloaderDisplay.initialize().
public function initialize():void {
//Ìí¼Ólogoͼ
dpbImageControl = new Loader();
dpbImageControl.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_completeHandler);
Ïà¹ØÎĵµ£º
flexµÄʼþ·Ö·¢ÊǸöºÃ¶«Î÷£¬µ«ÊÇʵ¼Ê±à³ÌµÄʱºòÌ«¶à¶òÓà´úÂ룬¶øÇÒʼþÖ®¼ä´©À´²åÈ¥£¬²»·ûºÏÒ»°ã³ÌÐòÔ±µÄÊéдϰ¹ß£¬Í¬ÑùµÄExtjsÒ²ÊÇ»ùÓÚÒì²½´¦Àí²¢ÇÒËüµÄ´úÂ뼸ºõijÖ̶ֳÈÉÏ¿ÉÒÔÀí½âÊÇflexµÄjs°æ±¾£¬µ«¾ÍûÄÇô¶àÈËÂñÔ¹ËüµÄÒì²½´¦ÀíºÜÂé·³¡£
½â¾ö°ì·¨£º
1¡¢ÆÚ´ýij¸öflash builderµÄ²å¼þ¼°¿ò¼Ü£¬¿É·â±Õ¹ÜÀíʼþ£¬²¢ÇÒʼþÁ ......
Ò»ÊÇ»ÃæmxmlÖÐÖ±½ÓǶÈ룬ºÜÏñjsµÄʹÓ÷½Ê½
Èç
<mx:Script>
<![CDATA[
public function showTxt():void
{
mytxt.text="Hello Flex baby!"
}
]]>
< ......
Flex3ÑùʽÉè¼Æ¹¤¾ß(Flex Explorer) ˵Ã÷£º
Flex Explorer·Ç³£ÊʺϳõѧÕßʹÓã¬Ëû¿ÉÒÔÈÃÄã¿ìËÙÉÏÊÖFLEXÉè¼Æ¡£AIRIA
½« Flex3 component Explorer ,Flex Style Explorer,Flex Filter Explorer,Flex Primitive Explorer´ò°üÌṩÏÂÔØ¡£ÆäÖÐ Flex3 component Explorer
°üº¬ÁËFLEX¾ ......
»ù±¾Ê¼þ´¦Àí
ÓÃÓÚÖ¸¶¨ÎªÏìÓ¦ÌØ¶¨Ê¼þ¶øÓ¦Ö´ÐеÄÌØ¶¨²Ù×÷µÄ¼¼Êõ³ÆÎªÊ¼þ´¦Àí¡£ÔÚ±àдִÐÐʼþ´¦ÀíµÄ ActionScript ´úÂëʱ£¬ÄúÐèҪʶ
±ðÈý¸öÖØÒªÔªËØ£º
• ʼþÔ´£º·¢Éú¸ÃʼþµÄÊÇÄĸö¶ÔÏó£¿ÀýÈ磬Äĸö°´Å¥»á±»µ¥»÷£¬»òÄĸö Loader ¶ÔÏóÕýÔÚ¼ÓÔØÍ¼Ïñ£¿Ê¼þÔ´Ò²³ÆÎªÊ¼þÄ¿
±ê£¬ÒòΪ Flash Player »ò AIR ½«´Ë¶ÔÏó×÷Ϊ ......