How do I include a SWC in an AS2 Flash project?

耗尽温柔 提交于 2019-12-12 19:08:07

问题


In AS3, I know how to accomplish this. One needs only to click "ActionScript Settings", and navigate to the SWC file under "SWC Files or Folders Containing SWC Files".

However, when the project is set to AS2, the "Actionscript 2.0 Settings" is a rather sparse menu, and adding the folder as a classpath doesn't seem to work.

Can this even be accomplished?


回答1:


Assuming that your SWC was created for AS2 as a compiled component, you have to add it to your Flash components folder. For me, using CS4 on Win7 the path is:

C:\Users\USERNAME\AppData\Local\Adobe\Flash CS4\en\Configuration\Components

Once this is done, restart Flash and the component SWC should be visible in the Components panel of the IDE. Drag it to the stage and then delete it, which will leave a copy of it in your library. You should now be able to access the classes within the SWC in code.

Source (also contains instructions for SWC creation which is beyond the scope of the question)



来源:https://stackoverflow.com/questions/4089072/how-do-i-include-a-swc-in-an-as2-flash-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!