关于flex MDI的应用

官网信息:(API:http://flexlib.googlecode.com/svn/trunk/docs/index.html)
HowToContribute  
How you can contribute code to FlexLib

IntroductionLicenseBefore you submit codeFlexBuilderProject page to learn how to check out the project into Flex Builder. Read HowToBuild to learn how to compile the source files.

Everyone is encouraged to contribute Flex components they have developed. The FlexLib project is meant to be an inclusive community project. That said, we want to make sure that the components included in the FlexLib library are high quality and follow good coding practices.

All code submitted to FlexLib must be released under the MIT license. All code must have the standard version of the FlexLib MIT license block added to each source file (see any of the current source files in the SVN repository). Any original classes from Adobe or Macromedia should retain the original licensing block contained in those files.

Here's the license block:

/* 
Copyright (c) 2007 FlexLib Contributors.  See: 
    http://code.google.com/p/flexlib/wiki/ProjectContributors 
 
Permission is hereby granted, free of charge, to any person obtaining a copy of 
this software and associated documentation files (the "Software"), to deal in 
the Software without restriction, including without limitation the rights to 
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of the Software, and to permit persons to whom the Software is furnished to do 
so, subject to the following conditions: 
 
The above copyright notice and this permission notice shall be included in all 
copies or substantial portions of the Software. 
 
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
SOFTWARE. 
*/

Please make sure you become familiar with the current FlexLib codebase. You should check out the latest version of FlexLib from the SVN repository. Follow the instructions on the

Make sure you are comfortable with checking out the source code and building the project. It's not too hard, and if you're not already familiar with using SVN and Ant within Eclipse then now is a great chance to learn.

To submit your componentsFlexLib Discussion Group. Please either send along the code you want to add to flexlib, or links to the source code available on the web.

If this is your first contribution to FlexLib then you do not have the ability to commit changes to the SVN repository. Contact one of the project administrators, this is either Darron Schall or Doug McCune by posting a message to the

Once your contribution is submitted we'll review it to make sure it's up to the standards of the FlexLib project. This isn't meant to scare away developers, we welcome all contributions, but we want to make sure we keep the quality of the project high. Assuming you've submitted awesome code, we'll integrate it with FlexLib and provide you with SVN access, so in the future you can commit your own code to the project.

Pure Actionscript vs. MXMLASDoc DocumentationUsing ASDoc on LiveDocs.

Ideally all components included in FlexLib will be pure Actionscript 3.0 classes, not MXML classes. Anything you can do with an MXML class you can do with pure Actionscript. If you have some components you've developed in MXML we'll still incorporate them into FlexLib, with the intention of eventually reworking them as pure AS classes.

We use ASDoc to generate the documentation for FlexLib. Documentation style should be consistent with the format of the documentation throughout the Flex SDK framework classes. Obviously the level of source code documentation will vary from contributor to contributor, but we hope you'll take the time to provide comprehensive documentation in your code.

For more on ASDoc and how to format your comments, see

Examplesexamples directory.

Each component (or set of related components) should have an associated example MXML application. This application should be a standalone Flex application that demonstrates the functionality of the component. The MXML file (and any associated resource files) should go in a subdirectory of the src/examples/ directory. See the current

These examples get compiled by the Ant build script. The Ant build target responsible for compiling the examples is called "examples" in the build.xml file. This build target loops over any MXML files that are named *_Sample.mxml under the src/examples/ directory and compiles each one into a SWF. Note that you should include the MIT licensing block in the example MXML file as well.

Your example should be simple, but it should also demonstrate the functionality of the component. Here's the example MXML file for the PromptingTextInput component:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"  
        xmlns:flexlib="http://code.google.com/p/flexlib/" 
        layout="vertical"> 
         
        <mx:Panel title="PromptingTextInput Sample"> 
                <mx:Form> 
                        <mx:FormItem label="Name:"> 
                                <mx:TextInput id="fullName" /> 
                        </mx:FormItem> 
                         
                        <mx:FormItem label="Address:" direction="vertical"> 
                                <flexlib:PromptingTextInput id="address1" prompt="Address 1" /> 
                                <flexlib:PromptingTextInput id="address2" prompt="Address 2" />                  
                                <mx:HBox> 
                                        <flexlib:PromptingTextInput id="city" prompt="City"  width="129"/> 
                                        <flexlib:PromptingTextInput id="state" prompt="State"  width="50"/> 
                                        <flexlib:PromptingTextInput id="zip" prompt="Zip"  width="77"/> 
                                </mx:HBox> 
                        </mx:FormItem>           
                </mx:Form> 
 
                <mx:ControlBar horizontalAlign="right"> 
                        <mx:Button id="submit" label="Submit" /> 
                </mx:ControlBar> 
        </mx:Panel> 
</mx:Application>

 

 

 

 

以下需要修改:(现在没时间)

首先,到http://code.google.com/p/flexmdi/下载swc包,放在下面libs下,

如果是flex web项目,放在flex_libs下

/*==========静态加载mdi=================**/

<!--必须使用MDICanvas画布--> 
    <flexmdi:MDICanvas id="mdiCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off" 
            width="100%" height="100%" backgroundColor="#FC9874" backgroundAlpha="0"> 
              
            <mx:Button x="62" y="48" label="打开新窗体" click="show()"/> 
            <!--必须使用MDIWindow--> 
            <flexmdi:MDIWindow id="win2" title="Window 2" x="214" y="10" width="500" height="300" borderColor="#A9D3FB" barColor="red" cornerRadius="10"  layout="absolute"> 
                <!--加载自己的swf-->     
                <mx:SWFLoader source="AdvenceDG.swf" width="100%" height="100%"/> 
            </flexmdi:MDIWindow> 
              
        </flexmdi:MDICanvas> 

/*==========动态加载mdi=================**/

import mx.controls.SWFLoader;  
            import mx.controls.Alert;  
            import flexmdi.effects.effectsLib.MDIVistaEffects;  
              
              
            import flexmdi.containers.MDICanvas;  
            import flexmdi.containers.MDIWindow;  
private function show():void 
            {  
                 mdi=new MDIWindow();  
                mdi.width=500;  
                mdi.height=400;  
                  
                var swf:SWFLoader=new SWFLoader();  
                swf.source="WindowFrame.swf";  
                swf.percentWidth=100;  
                swf.percentHeight=100;  
                mdi.addChild(swf);  
                          
                //右键菜单  
                var cm:ContextMenu=new ContextMenu();  
                cm.hideBuiltInItems();  
                var menu:ContextMenuItem=new ContextMenuItem("最小化");  
                menu.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,maxHandle);  
                cm.customItems.push(menu);  
                mdi.contextMenu=cm;  
                //  
                this.mdiCanvas.windowManager.add(mdi);   

}

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值