简体   繁体   English

将库文件夹相对于FlashBuilder中的ActionScript项目放在哪里?

[英]where to put library folders relative to ActionScript project in FlashBuilder?

If I create a new ActionScript project with Flash Builder and want to add some library (for example Tweenlite) where do I have to put the gs folder of Tweenlite relative to my project folder? 如果我使用Flash Builder创建一个新的ActionScript项目并想要添加一些库(例如Tweenlite),则必须在其中将Tweenlite的gs文件夹相对于我的项目文件夹放置在哪里? and what do I need to setup in the project settings in order to be able to use it? 为了能够使用它,我需要在项目设置中进行哪些设置?

Doesn't matter, where to put your library folder. 没关系,将库文件夹放在何处。 Just set the path to this folder at Project -> Properties -> Flex Build Path -> Library Path -> Add SWC Folder...(or Add SWC) 只需在Project-> Properties-> Flex Build Path-> Library Path-> Add SWC Folder ...(或Add SWC)中设置此文件夹的路径

I would recommend that you create a new Library project named something like 'TweenLite' and dump the files in there. 我建议您创建一个名为“ TweenLite”的新图书馆项目,并将文件转储到那里。 Then in Flash Builder go to: 然后在Flash Builder中转到:

Project -> Properties -> Flex Build Path -> Library path tab -> Add Project -> select the tweenlite project. 项目->属性-> Flex构建路径->库路径选项卡->添加项目->选择Tweenlite项目。

In this manner the project's source only gets compiled when it needs to be and the resulting swc is used by your application. 通过这种方式,项目的源代码仅在需要时才被编译,并且生成的swc由您的应用程序使用。 You still get the benefits of the go-to source hotkey and can set breakpoints in the tweenlite project as well. 您仍然可以获得go-to源热键的好处,并且还可以在tweenlite项目中设置断点。

Cleaner, reusable, faster, it's how I do things. 更干净,可重复使用,更快,这就是我的工作方式。

*Ah also, multiple projects can reference the tweenlite library project now instead of having to copy & paste the code everywhere. *同样,多个项目现在可以引用tweenlite库项目,而不必到处复制和粘贴代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM