简体   繁体   English

Adobe Air集成了Flex组件

[英]Adobe Air integrate Flex Components

I'm currently developing an Adobe Air application, using Adobe Flash CC 2005, Flash Builder 4.7, and ActionScript 3. 我目前正在使用Adobe Flash CC 2005,Flash Builder 4.7和ActionScript 3开发Adobe Air应用程序。

I notice that the UI Components like the List Component don't scroll up or down with finger on mobile devices. 我注意到,UI组件(例如列表组件)在移动设备上不会用手指向上或向下滚动。

If I'm understanding right, the Flex Framework has components like a List that support mobile. 如果我理解正确,那么Flex框架具有支持移动设备的列表等组件。

Is it possible to integrate Flex Components to the existing Adobe Air project? 是否可以将Flex组件集成到现有的Adobe Air项目中? If so, how? 如果是这样,怎么办?

Use feathers instead.. it's similar to flex. 用羽毛代替..它类似于flex。

http://feathersui.com/ http://feathersui.com/

I don't think so. 我不这么认为。 You can wrap Flash Classes for use in Flex, but Flex components depend on the Flex Framework, which is contradictory with the timeline and the way Flash gets used in Flash. 您可以包装Flash类以在Flex中使用,但是Flex组件依赖于Flex Framework,这与时间轴和Flash在Flash中的使用方式矛盾。 I believe that Air will generate those events when you publish your project for Air, so you should be able to add the functionality by listening for the events yourself and updating the scroll position. 我相信当您为Air发布项目时,Air会生成这些事件,因此您应该能够通过自己侦听事件并更新滚动位置来添加功能。 Good luck--the Flash component code isn't the easiest in the world to work with. 祝您好运-Flash组件代码并非世界上最容易使用的。 You might be better off writing your own implementation so you know what's in it. 您最好编写自己的实现,以便了解其中的内容。

To give a little more insights on top of the answers already given. 除了已经给出的答案之外,还可以提供更多的见解。 Yes it's possible but it's probably not worth the trouble because of the hacky way this must be done and the potential troubles this will bring. 是的,这是可能的,但由于必须采取棘手的方式以及可能带来的潜在麻烦,因此不值得为此烦恼。 As said to one answer you should probably create your own specific components or try to find some in a custom library like MadComponents or others. 正如对一个答案所说,您可能应该创建自己的特定组件,或者尝试在自定义库中找到某些组件,例如MadComponents或其他组件。

2 possible ways: 2种可能的方式:

  1. You can include all relevant Flex .swc in your project and then try for each component needed to instantiate yourself those components and follow strictly the Flex object instantiation workflow. 您可以在项目中包含所有相关的Flex .swc,然后尝试实例化自己所需的每个组件,并严格遵循Flex对象实例化工作流程。 This can be easy (Button) to very difficult depending on the component. 根据组件的不同,这可能很容易(按钮)到非常困难。

  2. Create the needed component in a Flex project. 在Flex项目中创建所需的组件。 Export the resulting .swf. 导出生成的.swf。 Load that .swf in your AIR project (can be difficult in Ios). 将.swf加载到AIR项目中(在Ios中可能很困难)。 Access objects within the loaded .swf and create clones or use those objects directly in your app. 访问已加载的.swf中的对象并创建克隆或直接在您的应用中使用这些对象。 This is a hack and results can be deceiving. 这是骇客行为,其结果可能具有欺骗性。 The loading app will have to listen to the relevant Flex Event in order to determine if the components are ready to be used. 加载应用程序将必须收听相关的Flex事件,以确定组件是否准备就绪。

In a nutshell: it's possible to use Flex for creating Adobe AIR applications. 简而言之:可以使用Flex创建Adobe AIR应用程序。 Here are few articles from the official Adobe website: 以下是Adobe官方网站上的几篇文章:

Creating your first desktop AIR application with the Flex SDK 使用Flex SDK创建第一个桌面AIR应用程序

Creating your first desktop Flex AIR application in Flash Builder 在Flash Builder中创建第一个桌面Flex AIR应用程序

Also, please, pay attention, that Flex-based applications require a different version of Flex SDK, than regular AS3-based applications. 另外,请注意,与常规的基于AS3的应用程序相比,基于Flex的应用程序需要不同版本的Flex SDK。

http://www.adobe.com/devnet/air/air-sdk-download.html - here at the bottom you may find links to the AIR SDK for the Flex-based applications and text: http://www.adobe.com/devnet/air/air-sdk-download.html-在底部,您可以找到基于Flex的应用程序和文本的AIR SDK的链接:

Note: Flex users will need to download the original AIR SDK without the new compiler. 注意:Flex用户将需要下载原始的AIR SDK,而不使用新的编译器。

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

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