简体   繁体   English

Flash Builder:如何将Flex项目框架添加到ActionScript项目中?

[英]Flash Builder: how to get flex project framework into ActionScript project?

If I create a new flex project with flashbuilder, these are the libraries that get included by default through the Flex SDK: 如果我使用flashbuilder创建一个新的flex项目,则默认情况下,这些是通过Flex SDK包含的库:

http://neo.cycovery.com/flex_problem4.gif

If I create a ActionScript project, then the Flex SDK framework with the exact same path includes much less swc files: 如果我创建一个ActionScript项目,则路径完全相同的Flex SDK框架包含的swc文件要少得多:

http://neo.cycovery.com/flex_problem5.gif

how do I get the full flex framework into an ActionScript project? 如何将完整的flex框架放入ActionScript项目中?

If I try to add for example aircore.swc manually, i get a 如果我尝试手动添加例如aircore.swc,我会得到一个

Description Resource Path Location Type
An internal build error has occurred. Right-click for more information. mvp     Unknown Flex Problem

error 错误

In Flash Builder's new Project wizard, you need to create a new "Flex Project" and then select "Desktop" as the application type. 在Flash Builder的新项目向导中,您需要创建一个新的“ Flex项目”,然后选择“桌面”作为应用程序类型。 In next screen, it asks for default main class, just specify your main .as (ActionScript) class file here. 在下一个屏幕中,它询问默认的主类,只需在此处指定您的主.as(ActionScript)类文件。

Erm, you can't. 嗯,你不能。 Flex is a framework that brings more functionality to the table, which Actionscript cannot comprehend (and if I remember correctly, you AS project will be sprite based while Flex's is UIComponent based). Flex是一个为表带来更多功能的框架,Actionscript无法理解该功能(如果我没记错的话,您的AS项目将基于Sprite,而Flex的基于UIComponent)。 You can only load a Flex application in Actionscript using the Loader. 您只能使用加载程序在Actionscript中加载Flex应用程序。

Can I ask why are you creating an Actionscript project if you want the capabilities of Flex? 我可以问一下,如果要使用Flex的功能,为什么还要创建一个Actionscript项目? Why not just create a Flex project? 为什么不创建Flex项目呢?

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

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