简体   繁体   English

如何在Flash CS4上使用SWC文件

[英]How to use an SWC file on Flash CS4

I am trying to understand how to use an swc file I have in Flash CS4. 我试图了解如何使用我在Flash CS4中的swc文件。

As I search this subject on the web regarding flesh there are 2 issues: 1. That I know how to deal with Flex and the explanations are referring flex. 当我在网上搜索关于肉体的这个主题时,有两个问题:1。我知道如何处理Flex并且解释是指flex。 2. I haven't found 1 simple example that demonstrates where to put the swc file, what to write on the fla in order to make it work, etc... 2.我没有找到一个简单的例子来演示放置swc文件的位置,在fla上写什么以使其工作,等等......

I want to ask if someone knows of a simple exampe - or - step-by-step example so that I would know how it works... 我想问一下是否有人知道一个简单的例子 - 或 - 逐步的例子,以便我知道它是如何工作的......

Alon 阿龙

You can put the swc file wherever you want. 您可以将swc文件放在任何地方。 Quite often it is put in a 'libs' folder at the same level as the 'src' folder. 通常它被放在与'src'文件夹相同级别的'libs'文件夹中。

You then need to link the swc to your fla. 然后,您需要将swc链接到fla。 You do this by File>Publish Settings>Flash>Settings>Library Path>Browse to SWC File (the little red envelope) 您可以通过文件>发布设置> Flash>设置>库路径>浏览到SWC文件(小红包)来执行此操作

You will now be able to reference assets and code within the swc. 您现在可以在swc中引用资产和代码。 If you created the swc or there is an API, it will be much easier for you, especially if you are working within the Flash IDE. 如果您创建了swc或者有一个API,那么对您来说会更容易,特别是如果您在Flash IDE中工作。

you can change the .swc extention to .zip and then extract the contents. 您可以将.swc扩展名更改为.zip,然后提取内容。 That way you can at least get at some or most of the code if you wanted to convert its capabilities into a class or external AS. 这样,如果您想将其功能转换为类或外部AS,您至少可以获得部分或大部分代码。

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

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