惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Vulnerabilities – Threatpost
U
Unit 42
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
F
Full Disclosure
月光博客
月光博客
Engineering at Meta
Engineering at Meta
博客园_首页
The Register - Security
The Register - Security
G
Google Developers Blog
The Cloudflare Blog
博客园 - Franky
K
Kaspersky official blog
A
Arctic Wolf
Scott Helme
Scott Helme
C
Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
C
Check Point Blog
NISL@THU
NISL@THU
AI
AI
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Vercel News
Vercel News
T
Tor Project blog
P
Privacy International News Feed
D
Docker
I
Intezer
L
LangChain Blog
P
Proofpoint News Feed
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
博客园 - 聂微东
AWS News Blog
AWS News Blog
Martin Fowler
Martin Fowler
P
Privacy & Cybersecurity Law Blog
V
V2EX
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
The Hacker News
The Hacker News
T
Tenable Blog
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog

博客园 - 祥子哥哥

纪念一下我的20年的博客园。 [转]OPC.Client for DA and UA 使用C#开发库UcAsp.OPC.Client使用案例 推荐一个.Net的轻型RPC服务UcAsp.RPC Lucene.Net Kmeans++算是DONet实现 tinymce上传文件插件。 C#中图片处理中定义显示区域[或者可以称为蒙板效果] C#生成的图片如何设置DPI Jpg保存图片确认质量 Flex在子控件操作父窗口函数 刚刚写的一个加密算法 如何在DropDownList第一項加入新項目 2003服务器中出现"请求的资源在使用中"错误的解决方法 如何在.Net中访问MySQL数据库 MS SQL日志清理代码 Server Application Error Javascript检测Flash插件是否安装及版本号 最近ASP.NET WAP开发的一些情况! 数据库备份
Flex 不同 application 之间传参数(转) - 祥子哥哥
祥子哥哥 · 2009-07-25 · via 博客园 - 祥子哥哥

通过主影片来获得所有子影片的systemmanager,然后分别传递给各个子影片。子影片通过各自的systemmanager来调用别的影片。

子模块

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
        <![CDATA[
            import mx.managers.SystemManager;
            public function output(s:String):void{
                trace(s);
            }
            
            public function CallFriend():void{
                SampleChildren(_SystemManager.application).output("call...");
            }
            
            private var _SystemManager:SystemManager;
            
            public function register(ASystemManager:SystemManager):void{
                _SystemManager=ASystemManager;
            }
                
        ]]>
    </mx:Script>
</mx:Application>

主模块

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
    <mx:Script>
        <![CDATA[
            import mx.managers.SystemManager;
            
            var Children1,Children2:SystemManager;
            
            private function onClick(e:Event):void{
                SampleChildren(Children1.application).register(Children2);
                SampleChildren(Children2.application).register(Children1);
            }
            
            private function initNestedAppProps():void {
                Children1 = SystemManager(myLoader.content);
                trace(Children1.application);
            }
            private function initNestedAppProps2():void {
                Children2 = SystemManager(myLoader2.content);
                trace(Children2.application);
            }
            
            private function onC1(e:Event):void{
                SampleChildren(Children1.application).CallFriend();
            }  
            private function onC2(e:Event):void{
                SampleChildren(Children2.application).CallFriend();
            }              
            
        ]]>
    </mx:Script>
    <mx:Button label="ClickMe" click="onClick(event);"/>
    
    <mx:Button label="c1 call c2" click="onC1(event);"/>
    <mx:Button label="c2 call c1" click="onC2(event);"/>
    
    <mx:SWFLoader id="myLoader" width="300"
        source="SampleChildren.swf"
        creationComplete="initNestedAppProps();"/>
    <mx:SWFLoader id="myLoader2" width="300"
        source="SampleChildren.swf"
        creationComplete="initNestedAppProps2();"/>    
</mx:Application>