flexÖÐgetDefinitionByName º¯ÊýµÄʹÓÃ
ÔÚÏîÄ¿ÖÐ×Ô¶¨ÒåÒ»¸öCheckboxGroup£¬Õâ¸ö¿Ø¼þÀïÃæ°üº¬¶à¸öCheckboxÏë¿ØÖÆCheckboxµÄÐÐΪ£ºËùÒÔʹÓòéÕÒһϰïÖúʹÓÃflexÖоµä·½·¨£ºgetDefinitionByName º¯ÊýµÄʹÓÃ
public function getDefinitionByName(name:String):Object
·µ»Ø²ÎÊý name ÖÐÖ¸¶¨µÄÀàÒýÓÃ
²ÎÊý name:String - ÀàÃû³Æ
·µ»Ø Object - ·µ»Ø²ÎÊý name ÖÐÖ¸¶¨µÄÀàÒýÓÃ
´íÎó ReferenceError - ÕÒ²»µ½²ÎÊý name ¶ÔÓ¦µÄ¹«¹²¶¨Òå
as3ÖеÄgetDefinitionByNameº¯ÊýÊÇ ·µ»Ø name ²ÎÊýÖ¸¶¨µÄÀàµÄÀà¶ÔÏóÒýÓá£
ÕâÑù¾Í¿ÉÒÔʹÓÃÕâ¸ö·½·¨¸ù¾ÝÒÑÖªÀàµÄ·¾¶µÄ×Ö·û´®À´»ñÈ¡ÀàµÄÀà¶ÔÏóÒýÓá£ÕâÑù¾Í¿ÉÒÔÀûÓÃÕâ¸öÌØÐÔÈÃflash¶¯Ì¬´´½¨ÀàµÄʵÀý...
µ«ÎÊÌâÊÇ:
1. ʹÓÃgetDefinitionByName·½·¨»ñµÃµÄÀà±ØÐëÊÇÔÚ·¢²¼µÄʱºò±»±àÒëµ½swfÎÄÖеÄ,·ñÔò¾Í»á±¨´í:"ReferenceError: Error #1065: ±äÁ¿ <ÀàµÄÃû×Ö> 䶨Òå¡£"
2. ÓÉÓÚʹÓÃimportµ¼ÈëµÄÀà(Ö»ÊÇ×÷Ϊ²éÕÒÀàµÄ·¾¶)²¢²»»áÔÚ·¢²¼swfµÄʱºò±»±àÒë½øÈ¥(µ±È»flash.*°üÀïÃæµÄÀà±¾Éí¾ÍÊÇplayerÖеÄ),Ö»ÓÃÔÚ´úÂëÖÐʹÓõ½µÄÀà²Å»á±»±àÒë½øÈ¥...
ÄÇô,ҪʹÓÃÕâ¸ö·½·¨À´ÊµÏÖ¶¯Ì¬Ö´ÐÐÔõô°ì? Ö»ÓаѿÉÄÜÐèÒªµÄËùÓÐÀà°üº¬ÔÚ´úÂëÖÐ(±ÈÈçÔÚ¶¨Òå±äÁ¿µÄÀàÐÍÉùÃûʱʹÓà *),²¢ÇÒÔÚ¿ªÊ¼ÉùÃû´ËÀ࣬ÉùÃûʱ¿ÉÒÔËæ±ãʹÓøöÃû×Ö£¬ÕâÑù²ÅÄÜʹÓÃgetDefinitionByName·½·¨...
ʵ¼ÊÉÏgetDefinitionByNameËù»ñµÃµÄÀàÃû¾ÍÊÇÇ°ÃæÄãËù×öµÄÉùÃûµÄÃû×ÖÒýÓÃ
-------------------------------------------------
import com.ooph.parser.*;
//°üÄÚÓÐParserWebÀà
var ss:ParserWeb;
//ÔÚ´Ë´¦ÉùÃûParserWebÀ࣬ÃûΪss(Ãû×Ö²»ÓÃÓëÏÂÃæʵÀýÃûµÄÏàͬ)
var sortStr:String="Web";
var P:Class = getDefinitionByName("com.ooph.parser.Parser"+sortStr) as Class;
//×¢ÒâÕâÀïҪдÍêÕûµÄÀà·¾¶ "com.ooph.parser.Parser"+sortStr
var newParser:* = new P();
getDefinitionByName(name) ·µ»Ø name ²ÎÊýÖ¸¶¨µÄÀàµÄÀà¶ÔÏóÒýÓá£
¾¹ý²âÊÔÖ»ÄÜ»ñÈ¡ÄÚÖõÄÀ࣬²»ÄÜ»ñÈ¡×Ô¶¨À࣬Ôõô½â¾öѽ£¿£¿
Æäʵ×îÖÕÎÊÌâÊÇ£¬ÖªµÀÀàÃû£¬µ«ÊÇΪ×Ö·û´®£¬ÈçºÎ»ñÈ¡Ëü£¿ÒòΪÊýÁ¿²»¶¨·ÅÔÚXMLÖÐÅäÖõġ£
ÒòΪÄÚÖÃÀà¿â¿Ï¶¨»á±»±àÒëµ½swfÀÕâÑù·´Éä¾ÍÄÜÄõ½¡£¶ø×Ô¶¨ÒåµÄÀ࣬Èç¹ûÕû¸ö¹¤³ÌÀﶼûÓÐÓõ½£¬¼´Ê¹importÒ²²»»á±»±àÒ루²»È»swfÀïµÄÀ¬»ø³É·ÖÌ«¶à£©¡£ÎÒ½¨Òé¿ÉÒÔ°ÑÐèÒª·´ÉäµÄÀà¿âÉú³ÉÒ»¸öswfÈ¥ÔØÈ룬»òÕßÔÚ¹¤³ÌµÄʲôµØ·½ÒýÓÃһϡ£
getDefinitionByName
()
º¯Êý
public function
Ïà¹ØÎĵµ£º
as ²»ÔÊÐíoverload...¼´¶ÔÓÚͬһ¸öº¯ÊýÃû²»ÄÜÓв»Í¬µÄ²ÎÊýÁбíºÍ·µ»ØÖµ
ÀàÖеÄgeter ºÍ setter ÓëÆäËûµÄ·½·¨Ò»Ñù,³ýÁË
1.getº¯ÊýûÓвÎÊý,²¢ÇÒ±ØÐëÓзµ»ØÖµ,²¢ÇÒ±ØÐëÓÐget¹Ø¼ü×Ö
2.setº¯Êý±ØÐëÓвÎÊý²¢ÇÒûÓзµ»ØÖµ,²¢ÇÒ±ØÐëÓÐset¹Ø¼ü×Ö
Java´úÂë
public function get sampleProperty( ):Str ......
Flex ¿ª·¢ÈëÃÅ
¼¶±ð£º ³õ¼¶
Áõ Çì (qlcdl@cn.ibm.com), Èí¼þ¹¤³Ìʦ, IBM Èí¼þ¿ª·¢ÖÐÐÄ
2009 Äê 1 ÔÂ 07 ÈÕ
±¾ÎĽéÉÜ Flex ¿ª·¢µÄ»ù´¡ÖªÊ¶£º°üÀ¨ÈçºÎ´î½¨¿ª·¢»·¾³£¬ÈçºÎµ÷ÊÔ£¬ÒÔ¼°ÈçºÎ½¨Á¢ºÍ²¿Êð¼òµ¥µÄ Flex ÏîÄ¿¡£Í¨¹ý±¾ÎĵÄѧϰ£¬¿ÉÒÔΪÄú½«À´ÉîÈëµØѧϰ Flex ´òÏÂÁ¼ºÃµÄ»ù´¡¡£
¿ªÊ¼Ö®Ç°
Flex ×÷Î ......
http://www.cnblogs.com/beniao/archive/2009/01/12/1373921.html
127.0.0.1ÊÇ»ØË͵ØÖ·£¬Ö¸±¾µØ»ú£¬Ò»°ãÓÃÀ´²âÊÔʹÓ᣻ØË͵ØÖ·£¨127.x.x.x£©ÊDZ¾»ú»ØË͵ØÖ·£¨Loopback Address£©,¼´Ö÷»úIP¶ÑÕ»ÄÚ²¿µÄIPµØÖ·£¬Ö÷ÒªÓÃÓÚÍøÂçÈí¼þ²âÊÔÒÔ¼°±¾µØ»ú½ø³Ì¼äͨÐÅ£¬ÎÞÂÛʲô³ÌÐò£¬Ò»µ©Ê¹ÓûØË͵ØÖ··¢ËÍÊý¾Ý£¬ÐÒéÈí¼þÁ¢¼´·µ»ØÖ®£¬²»½ø ......
Ê×ÏÈÒªÓÐÒ»¸ö¼òÒ׵ķþÎñÆ÷£¬½¨Á¢Ò»¸öÕ¾µã£¬È»ºóÕ¾µãÏ´æ·Å
1£ºcrossdomain.xml Õâ¸öÊÇ¿çÓëÓò²ßÂÔÎļþ£¬ÓÃÓÚÖ¸¶¨Óòͨ¹ýFlash
Player·ÃÎʱ¾ÓòµÄ×ÊÔ´(Èç¹û·þÎñÆ÷ÔÚ±¾»ú¾ÍûÓÐÕâ¸ö±ØÒª)µ«ÊÇÔ¶³ÌµÄ»°¾ÍÒª(½¨ÒéÒª)
ÎļþÄÚÈÝ£º
<cross-domain-policy>
<allow-access-from domain="*" /> ......