flexlib项目导入和MDIWindow拖动停靠源码修改

本文指导如何将FlexLib项目添加至FlexBuilder,配置编译参数以使用Flex3或Flex4,以及解决窗口拖动时的显示问题。通过在MDIManager设置enforceBoundaries为false,避免窗口被拖出容器外,进一步修改MDIWindow的onWindowMove方法以保持窗口在容器内的可见性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


Add an SVN Repository location for this project

  • In the Window menu, select Show View -> Other
  • Expand SVN and select SVN Repository, then click OK
  • Right click in the SVN Repository view and select New -> Repository location...
  • Enter the SVN Repository for this project: http://flexlib.googlecode.com/svn/trunk/
  • Click Finish

Check out the code from the project into the Flex Library Project

  • Right click on the repository location you added in the previous step, and select Checkout...
  • Select "Check out as a project configured using the New Project Wizard" and click Finish
  • Expand the Flex folder, select Flex Library Project, and click Next
  • Name the project after this library (in this case, flexlin), and select the directory where the source code will be placed (or, you can just use the default directory there, under the current workspace). Click Finish.

Configure the project to include the proper classes in the .swc output file

After the code is checked out from the previous step, you need to modify the project so that it knows what classes to include in the output .swc file.

  • Right click on the project that you just created in FlexBuilder and select Properties
  • Select Flex Library Build Path
  • In the "Main Source Folder" field, type in "src"
  • Under the Classes tab, select the "src" folder to include everything. Alternatively, you can pick and choose what classes you want.
  • Click OK

Configure the project to build against Flex3 or Flex4

After the code is checked out from the previous step, you need to modify the project so that it knows whether it should build against Flex3 or Flex4.

  • Right click on the project that you just created in FlexBuilder and select Properties
  • Select Flex Library Compiler
  • Update Addition Flex Compiler arguments box with one of:
    • Flex3 (default): -define+=FLEX_TARGET_VERSION::flex4,false -define+=FLEX_TARGET_VERSION::flex3,true
    • Flex4: -define+=FLEX_TARGET_VERSION::flex4,true -define+=FLEX_TARGET_VERSION::flex3,false
  • Click OK.

When the dialog closes, the project will be built and you'll have the projects .swc file placed in the default "bin" output directory.


上面黄色背景 需要设置到编译参数中


默认的 弹出窗体拖动都市在canvas里面。 这样 我们的可视界面就显得有点小了。

需要设置属性   MDIManager.enforceBoundaries 为  false  可以再canvas 创建完后事件中设置 。

但是这样设置后,又有一个问题 ,  窗体很容易被完全拖动到容器外面看不见了 。。

所以需要修改

MDIWindow 下的 onWindowMove 方法。


已经修改之后的包下载







评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值