“Adobe Flex”和使用 fl.controls 和 fl.events 庫的 AS3 應用程序有什麼區別? (what is the difference between "Adobe Flex" and an AS3 app using fl.controls and fl.events libraries?)


問題描述

“Adobe Flex”和使用 fl.controls 和 fl.events 庫的 AS3 應用程序有什麼區別? (what is the difference between "Adobe Flex" and an AS3 app using fl.controls and fl.events libraries?)

articles like this one  seem to say that Flex is a library for making desktop‑like applications that run in Flash Player. But what confuses me is that I have already built AS3 applications that imitate desktop look and feel without any "flex". I use libraries called fl.controls and fl.events, and it worked perfectly fine, with buttons, textboxes, listboxes, combo boxes etc.

Help me get my head around this issue. Is fl.controls and fl.events actually a part of flex, but I never realized this? Or are they a competing widget library/framework, but one that for marketing reasons Adobe did not bother assigning a sexy name like "flex"?

If flex is distinct from fl.controls and fl.events, can you use these libraries in a flex / AIR app? (I don't care about the "flex" aspect, just want to make AIR apps) Or is it a matter of either‑or, either the fl.* or the flex libraries in a single project?

Also, for clarity, I am now working in FlashDevelop and not in any of Adobe's proprietary IDE's. So I guess the difference between packages based on "which version of IDE got shipped with the particular library" is sort of lost on me.

‑‑‑‑‑

參考解法

方法 1:

The fl.controls library, from what I can tell, is really just a bunch of widgets you can use in Flash.  Flex, on the other hand, is an application development framework with a set rich development capabilities you can't get using AS3 and fl.controls alone.

Some of the things that Flex get you:

  1. Declarative markup in the form of MXML
  2. Data binding
  3. State management
  4. Skinning
  5. A component model for creating your own composite components

By default, these controls are not imported when you create a new Flex project in Flash Builder.  It appears, however, that it is possible.

From what I can tell, there aren't many use cases for doing this (other than integrating legacy code) since Flex provides everything and more compared to the fl.controls.

方法 2:

fl.controls.* are components used in Flash Professional.  they are akin to mx or spark components in the Flex framework.  however, the Flex spark components are much more advanced than the Flash Professional components, but i believe you'll have to use MXML code with AS3 (instead of just AS3) when you use Flex components.

方法 3:

The above answers are reasonable when using Flex for desktop computers, but for mobile devices the question is more complex.  The ease of development advantages of Flex come with a performance penalty that is a great problem for mobile development. One can achieve needed performance gains by eliminating states and data binding.  There are a number Adobe documents recommending not using them.  And in order to eliminate these easily, I have found it easiest to also not use mxml.  Because, it is easiest to get along without states when graphical components are instantiated programmatically.

Both spark.components and fl.controls can be skinned.  The difference is that spark.components have a skinnable interface that allows one to skin the same components with many different skins.  For me, this is an elegant feature for which I have not yet seen a requirement.  Although, I can imagine firms that develop the same components for multiple customers find this very useful.

I wish that I could report here on the relative performance of fl.controls vs spark.components.  If anyone has such data, please post it.  By viewing the class hierarchy it is clear that fl.controls are lighter weight, but it would be nice to be able to measure that advantage.

(by EndangeringSpeciesBrian GenisioChunky Chunkuser1157092)

參考文件

  1. what is the difference between "Adobe Flex" and an AS3 app using fl.controls and fl.events libraries? (CC BY‑SA 3.0/4.0)

#air #flash #actionscript-3 #flashdevelop #apache-flex






相關問題

如何在 Adobe Air 的 LIKE 運算符模式中使用命名參數 (How to use named parameters inside LIKE operator pattern in Adobe Air)

Android 和 Flash Professional CS 5 Adobe Air Audio:流錯誤 (Android & Flash Professional CS 5 Adobe Air Audio: Stream Error)

可以從 web 視圖中的鏈接觸發我的 Air 應用程序中的操作嗎? (It's possible to trigger an action in my Air app, from a link in a webview?)

動作腳本、NativeProcess、resolvePath 和 swf 不起作用 (Action script, NativeProcess , resolvePath and swf does not work)

如何在創建新線程的同時停止運行線程並恢復同一個線程? (how to stop running thread and resume the same thread beside create new thread?)

我怎樣才能很好地在視圖堆棧之間製作動畫 (How can I nicely animate between viewstacks)

Adobe AIR 從 Flash 是一場大災難? (Adobe AIR from Flash a big disaster?)

“Adobe Flex”和使用 fl.controls 和 fl.events 庫的 AS3 應用程序有什麼區別? (what is the difference between "Adobe Flex" and an AS3 app using fl.controls and fl.events libraries?)

表面上的 Playbook AIR SDK 圖像 (Playbook AIR SDK images on surface)

Adobe AIR 應用程序音頻 (Adobe AIR application audio)

需要在 AIR 上設置 cookie 標頭,使用 SWFLoader 檢索遠程 Flex .swf 文件 (Need to set cookie header on AIR use of SWFLoader to retrieve remote Flex .swf file)

AIR 應用程序的 ActionScript 項目? (ActionScript Project to AIR Application?)







留言討論