×Ô¶¨ÒåFlexµÄLoading½çÃæ
Ê×ÏÈ~×Ô¶¨ÒåFlex¼ÓÔصÄÔÀíÆäʵ¾ÍÊǼ̳Ðmx.preloaders.DownloadProgressBarÀà..È»ºóÖØдÏà¹ØµÄ·½·¨..
package
{
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.text.TextField;
import flash.text.TextFormat;
import mx.events.FlexEvent;
import mx.preloaders.DownloadProgressBar;
public class LoadingExampleProgressBar extends DownloadProgressBar
{
private var logo:Loader;
private var txt:TextField;
private var _preloader:Sprite;
public function LoadingExampleProgressBar()
{
logo = new Loader();
logo.load(new URLRequest("l4cd.png"));
addChild(logo);
var style:TextFormat = new TextFormat(null,null,0xFFFFFF,null,null,null,null,null,"center");
txt = new TextField();
txt.defaultTextFormat = style;
txt.width = 200;
txt.selectable = false;
txt.height = 20;
addChild(txt);
super();
}
//×îÖØÒªµÄ´úÂë¾ÍÔÚÕâÀï..ÖØдpreloader,ÈÃswfÖ´ÐмÓÔصÄʱºò~½øÐÐÄãÏ£ÍûµÄ²Ù×÷~
override public function set preloader(value:Sprite):void
{
_preloader = value
//ËĸöÕìÌý~·Ö±ðÊÇ ¼ÓÔؽø¶È / ¼ÓÔØÍê±Ï / ³õʼ»¯½ø¶È / ³õʼ»¯Íê±Ï
_preloader.addEventListener(ProgressEvent.PROGRESS,load_progress);
_preloader.addEventListener(Event.COMPLETE,load_complete);
_preloader.addEventListener(FlexEvent.INIT_PROGRESS,init_progress);
_preloader.addEventListener(FlexEvent.INIT_COMPLETE,init_complete);
stage.addEventListener(Event.RESIZE,resize)
resize(null);
}
private function remove():void{
_preloader.removeEventListener(ProgressEvent.PROGRESS,load_progress);
_preloader.removeEventListener(Event.COMPLETE,load_compl
Ïà¹ØÎĵµ£º
as ÔËËã·ûÊÇ ActionScript 3.0 ÖеÄÐÂÔöÔËËã·û£¬Ò²¿ÉÓÃÀ´¼ì²é±í´ïʽÊÇ·ñΪ¸ø¶¨Êý¾ÝÀàÐ͵ijÉÔ±¡£µ«ÊÇ£¬Óë is ÔËËã·û²»Í¬µÄ
ÊÇ£¬as ÔËËã·û²»·µ»Ø²¼¶ûÖµ£¬as ÔËËã·û·µ»Ø±í´ïʽµÄÖµ£¨´úÌæ true£©»ò null£¨´úÌæ false£©¡£ÏÂÃæµÄʾÀýÑÝʾÔÚ¼ì²é Sprite ʵÀý
ÊÇ·ñΪ DisplayObject¡¢IEventDispatcher ºÍ Number Êý¾ÝÀàÐ͵ijÉÔ±Õâ ......
ÔÎÄ£ºHow to dispatch an event from a custom item renderer
´Ó MXML ×é¼þÖзÖÅÉʼþ²¢²»À§ÄÑ£¬µ«ÊÇÏëÒª´Ó itemRenderer ÖзÖÅÉʼþ¾ÍûÓÐÄÇôֱ½ÓÁË¡£ÏÂÎÄÖУ¬ÎÒÃǽ«»Ø¹ËÒ»ÏÂÕâÁ½ÖÖÇé¿öµÄ´¦Àí·½Ê½²¢ÕÒ³öÒ»¸öºÏÊʵĽâ¾ö·½°¸¡£
Õý³£Çé¿öÏ£¬µ±ÄãÏë´Ó MXML ×é¼þÖзÖÅÉÒ»¸öʼþʱ»áʹÓÃÈçϵÄÔªÊý¾Ý±êÇ©£º
<!-- дÔÚÄ ......
1.Á¬½Ó×Ö·û´®:Á¬½Ó×Ö·û´®Ö¸Á½¸ö¼°Á½¸öÒÔÉϵÄ×Ö·û´®ºÏ²¢³ÉΪһ¸ö×Ö·û´®.
1.1."+"²Ù×÷·ûÁ¬½Ó×Ö·û´®
¸ñʽ:×Ö·û´®1+×Ö·û´®2+...;
//½á¹ûΪ"Thisworks"
var example:String="This"+"works";
//½á¹ûΪ"There are 24 people"
var attendance:int=24;
var output:String="There are&nb ......
Flex
Óë Asp.Net ͨ¹ý Remoting ·½Ê½½øÐÐͨѶ
Flex Óë Asp.Net ͨ¹ý Remoting ·½Ê½½øÐÐͨѶ (Ò»)http://hi.baidu.com/tsengyuen/blog/item/644e98a3353f7287471064ef.html
Flex Óë Asp.Net ͨ¹ý Remoting ·½Ê½½øÐÐͨѶ (¶þ)http://hi.baidu.com/tsengyuen/blog/item/af02730d58d6d7266059f3e8.html
Flex Óë Asp.Net ͨ ......
ºÜ¼òµ¥µÄСÀý×Ó£¬ÊʺϳõѧÕßÀí½â
1£¬JavaFlex.java
package flex;
public class JavaFlex {
public String helloJavaFlex(String name) {
return name;
}
}
2£¬remoting-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service" class="flex.messaging.services.Remo ......