Flex¶àSWFÎļþ¼ÓÔØÖ®Applicatoin Domain
¸ÅÒª
µ±ÎÒÃǼÓÔØÍⲿswfʱ£¬±ØÐëÒªÁ˽âÓ¦ÓóÌÐòÓò(Application Domain)¡£´ÓAdobe¹Ù·½ÎļþÖУ¬ÎÒÃÇ¿ÉÒÔµÃÖªÓ¦ÓóÌÐòÓòÄܹ»°Ñ´¦ÓÚͬһ¸ö°²È«Óò(Security Domain)ÖеÄÀà·ÖÀ뿪£¬ÕâÑù¾Í¿ÉÒÔÈÃÒ»¸öÀàµÄ¶à¸ö¶¨Òå¹²´æ£¬»òÊÇÈöà¸ö×ÓÓ¦ÓÃÀ´¹²Ïí¸¸Ó¦ÓõÄÀඨÒå¡£¼òµ¥µãÀí½â¾ÍÊÇÓ¦ÓóÌÐòÓòΪÀඨÒåÌṩÁË·ÖÇø¹¦ÄÜ¡£
Ó¦ÓóÌÐòÓò
Ò»¸öÀàµÄ¶à¸ö¶¨Òå¹²´æ£ºÄÚ´æÖÐÓжà¸öÀ࣬ËüÃÇÃû³ÆÏàͬ£¬µ«¶¨Ò岻ͬ¶¨Ò壬ÓÉÓÚ´¦ÓÚ²»Í¬µÄÓ¦ÓóÌÐòÓò£¬ËùÒÔ»¥²»¸ÉÈÅ£¬µÃÒÔ¹²´æ¡£
×ÓÓ¦Óù²Ïí¸¸Ó¦ÓõÄÀඨÒ壺N¸ö×ÓÓ¦ÓÃÒýÓÃͬһ¸ö¸¸Ó¦ÓõÄËùÌṩµÄÀඨÒ壬µ±¸¸Ó¦ÓøüÐÂʱ£¬×ÓÓ¦ÓÃËùÒýÓõÄÄÚÈÝÒ²»áËæÖ®¸üС£
µ±¼ÓÔØÍⲿswfÎļþʱ£¬¿ÉÒÔΪÆäÉèÖÃÈýÖÖÓ¦ÓóÌÐòÓò£º
Ò»¡¢½«¼ÓÔصÄswfÖ¸¶¨ÖÁÒ»¸ö¼È´æµÄÓ¦ÓóÌÐòÓòÖС£
¶þ¡¢½«¼ÓÔصÄswfÖ¸¶¨ÎªÒ»¸ö¼È´æµÄÓ¦ÓóÌÐòÓòµÄ×ÓÓ¦ÓóÌÐòÓò¡£
Èý¡¢Îª¼ÓÔصÄswfÖ¸¶¨Ò»¸öȫеÄÓ¦ÓóÌÐòÓò¡£
ÎÒÃÇÏÈÀ´¿´Ò»Ï¹ٷ½ÎĵµµÄ˵Ã÷ͼ£º
ͼÖй²ÓÐËĸöÎļþ£¬·Ö±ðΪapplication1.swf¡¢module1.swf¡¢application2.swfºÍmodule3.swf¡£module1.swf¡¢application2.swfºÍmodule3.swf¾ù±»application1.swf¼ÓÔØ£¬ÆäÖÐmodule1.swfÓëapplication1.swfÊôÓÚͬһ¸öÓò£¬module3.swf±»»®·ÖÖÁapplication1.swfµÄ×ÓÓ¦ÓóÌÐòÓò£¬×îºóÊÇapplication2.swf£¬ËüÍêÈ«ÓµÓÐÒ»¸ö¶ÀÁ¢µÄÓ¦ÓóÌÐòÓò¡£
¶ÀÁ¢Óò£¬ÔÚÓ¦Óö¨ÒåÏàͬµÄÇé¿öÏ£¬¿ÉÒÔʹ¼¸¸ö°æ±¾²¢ÐÐ
var appDomainA:ApplicationDomain = new ApplicationDomain();
var contextA:LoaderContext = new LoaderContext(false, appDomainA);
var loaderA:Loader = new Loader();
loaderA.load(new URLRequest("application2.swf"), contextA);
¹²ÏíÓò£¬Ôö¼ÓеÄÀඨÒå(RSL)
var appDomainB:ApplicationDomain = ApplicationDomain.currentDomain;
var contextB:LoaderContext = new LoaderContext(false, appDomainB);
var loaderB:Loader = new Loader();
loaderB.load(new URLRequest("module1.swf"), contextB);
×ÓÓò£¬×ÓÓòÖеÄÀàÒýÓø¸Ó¦ÓÃÖеÄÀඨÒå
var appDomainC:ApplicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
var contextC:LoaderContext = new LoaderContext(false, appDomainC);
var loaderC:Loader = new Loader();
loaderC.load(new URLRequest("module3.swf"), contextC);
×¢ÒâÊÂÏî
¼ÓÔØͼƬ»òÊÇÓÃActionScript 1.0/2.0 ±àдµÄSWFÎļþʱ£¬²»¿ÉÒÔʹÓÃÓ¦
Ïà¹ØÎĵµ£º
FlexÖеı¾µØ¹²Ïí¶ÔÏó--SharedObject
±¾µØ¹²Ïí¶ÔÏóÓÐʱ±»³Æ×÷“Flash Cookie”£¬ËüÊÇÒ»¸öÊý¾ÝÎļþ£¬¿ÉÒÔÓÉËù·ÃÎʵÄÕ¾µãÔÚÄúµÄ¼ÆËã»úÉÏ´´½¨¡£ÔÚFlashÖÐÌṩÁËÏÂÃæµÄ²Ù×÷±¾µØ¶ÔÏóµÄ·½·¨£º
SharedObject.clear() ɾ³ý±¾µØ¹²Ïí¶ÔÏó£»
SharedObject.flush() Á¢¼´°Ñ¹²Ïí¶ÔÏóÊý¾ÝдÈë±¾µØÎļþ£»
SharedObject.getLoc ......
Flex
ÊÇÒ»¸ö¿ªÔ´µÄÓ¦Óÿª·¢¿ò¼Ü£¬ÓÃÀ´¹¹½¨ÔËÐÐÔÚweb£¨Ê¹Óà Flash Player£©»òÕß×ÀÃæÉÏ£¨Ê¹ÓÃAdobe
AIR£©µÄ¸»InternetÓ¦Óá£AdobeµÄFlex¿ª·¢ÕßÖÐÐÄÓÐһƪÎÄÕÂÌÖÂÛÁ˹ØÓÚFlexÐÔÄܵÄ×î¼Ñʵ¼ù£¬°üÀ¨ÁËÈÝÆ÷µÄʹÓÃϸ½Ú£ºFlex×î´óµÄ
ÐÔÄÜ·çÏÕÀ´×ÔÓÚ¶ÔÈÝÆ÷µÄÀÄÓá£ÔÚAdobe FlexÖÐÓдóÁ¿¿ÉÑ¡µÄÌØÐÔ£¬ÄãÓ¦¸Ã¿¼ÂÇÔÚÄãµÄÓ¦ÓÃÖÐʹÓÃËüà ......
flex¿Ø¼þ¶ÔÏó¡¢RemoteObjectµÈ¶¼ÓÐÒ»¸ö¹²Í¬µÄ·½·¨addEventListener¡£
addEventListener·½·¨ÈçÏ£º
public function addEventListener(type:String, listener:Function,
useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
{
eventDispatcher.addEventListener(type, listener, us ......
ÔÎĵØÖ·:
http://www.gridlinked.info/how-to-encrypt-flex-rsls/
ÕâÀï½ØÈ¡²¢³¢ÊÔ·ÒëÁËÒ»¶ÎFLEX³ÌÐò³õʼ»¯¼°´Ë½âÃܹý³Ì.
Ó¦ÓÃÆô¶¯¹ý³Ì:
1. Ê×ÏÈ, ΪµÚ1Ö¡¼ÓÔØ×ã¹»µÄÊý¾Ý.
2. Flash Playerͨ¹ý´´½¨SystemManagerʵÀýÖ´ÐмÓÔØÊý¾Ý.
3. SystemManagerÃüÁîFlash PlayerÍ£Ö¹ÔÚµÚÒ»Ö¡.
4. SystemManager´´½¨Preloader,
......