⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sampleparent.mxml.svn-base

📁 用Flex开发的RSS通用阅读器
💻 SVN-BASE
字号:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
    <mx:Script>
        <![CDATA[
        	import mx.events.FlexEvent;
            import mx.managers.SystemManager;
            
            private var Children1:SystemManager;
            
            private function onClick(e:Event):void{
               // SampleChildren(Children1.application).register(Children2);
               trace(Children1.application);
                 SampleChildren(Children1.application).register(Children1);
                 SampleChildren(Children1.application).CallFriend("ddddddddddddddd");
            }
            
            private function initNestedAppProps():void {
                Children1 = SystemManager(myLoader.content);
                Children1.addEventListener(FlexEvent.APPLICATION_COMPLETE,function(evt:FlexEvent):void{
                 trace(SystemManager(evt.target).application);
                  SampleChildren(Children1.application).register(Children1);
                  SampleChildren(Children1.application).CallFriend("ddddddddddddddd");
                });
               // trace(Children1.application);
                //myLoader.content
                //SampleChildren(Children1.application).CallFriend("ddddddddddddddd");
            }
//            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"
        complete="initNestedAppProps();"/>  
        
    <mx:SWFLoader id="myLoader2" width="300"
        source="http://assets.myflashfetish.com/swf/widgets/mff-clock.swf?mycolor=C90000"
        />    <!--creationComplete="initNestedAppProps2();"-->
</mx:Application>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -