我可以在没有Flex Builder的情况下使用Flex吗? [英] Can i use flex without Flex builder?

查看:165
本文介绍了我可以在没有Flex Builder的情况下使用Flex吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始研究FLEX。我只有flex sdk。所以我可以开始学习只使用它。如果是这样,请建议我通过链接。



但仍然,使用编辑器将尽量减少我们的工作,并将自己创建的代码。所以作为一名新的学习者,理解和学习新事物是很乏味的。

仅仅是一些背景:Flex Builder(又名Flash Builder),mxmlc编译器(免费)和Flash CSx都将ActionScript代码编译为SWF文件和/或AIR文件。 Flash CSx是一个以设计为中心的工具,内置一个超简单的编码编辑器(没有比Notepad更有用)。 Flex Builder / Flash Builder是一个成熟的程序员的IDE(基于Eclipse)。 mxmlc编译器是一个免费的命令行工具,可将ActionScript文件编译为SWF和AIR文件。 (您必须使用您自己的编辑器来编写源文件。)



MXML是一种xml语言,可用作Actionscript的快捷方式。你可以使用mxml而不是ActionScript来编译,编译器会在编译之前将你的mxml转换成ActionScript。您不能使用mxml作为所有AS编码的简写。大多数情况下,您可以将其用作UI编码的替代品,并将其用作将数据绑定到UI元素的方式。编译器将mxml转换为Actionscript类,然后将Actionscript类(以mxml创建的类和在Actionscript中本地编码的类)编译为字节码。 Flash的虚拟机(如浏览器插件)运行字节码。



目前,您可以编写Actionscript和mxml,然后使用Flex Builder / Flash Builder进行编译或mxmlc编译器(这是免费的)。 Flash CSx可以不理解mxml,所以你只能直接编译ActionScript脚本。



注意:有第三方工具,比如FDT也可以用于编写和编译Actionscript和mxml。



这个语言的Actionscript已经被修改了好几次了。经过短暂的阶段,当它是一种专有语言,它变成了很像Javascript的东西。然后,使用AS 2.0,它变得更像Java了,并且在AS 3.0中继续朝着这个方向发展。 (它的语法和Java非常相似,就像Java一样,它是基于类的)。

有一组ActionScript类可以在Flash中使用CSx,Flex Builder / Flash Builder和免费sdk。还有一些额外的类,称为Flex框架,可以在Flex Builder / Flash Builder和sdk中使用,但不在Flash CSx中。这些额外的类添加了新的可视化组件,如一个数据网格,一个高级UI布局引擎和一个数据绑定框架。



Flex Builder IDE(将在下一版本中重命名为Flash Builder)。



不使用Flex Builder进行编译 您也可以使用Flex Builder / Flash Builder而不使用Flex框架 - 这意味着您可以在IDE中编程,并且只使用不属于框架的ActionScript类(如果您在Flash中编程,而不是在Flex Builder中编程,则使用这些类)。



您可以选择使用或不使用mxml。您甚至可以使用mxml自动生成不属于Flex框架的Actionscript(例如,自定义类)。

为自己的课程使用mxml

祝您好运!
我的Actionscript博客


i am starting to study FLEX. i have only flex sdk. So can i start study only using that. If so please suggest me the link to go through..

But still, Using an editor will minimize our work and will create the code by its own. So as a new learner it would be tedious to understand and also hard to learn new things...

解决方案

Yes.

Just a bit of background: Flex Builder (a.k.a Flash Builder), the mxmlc compiler (free) and Flash CSx all compile Actionscript code into SWF files and/or AIR files. Flash CSx is a design-centric tool with a ultra-simplistic coding editor built in (not much more useful than Notepad); Flex Builder/Flash Builder is a full-blown programmer's IDE (based on Eclipse); the mxmlc compiler is a free command-line tool that compiles Actionscript files into SWF and AIR files. (You have to use your own editor to write the source files.)

MXML is an xml language that acts as a shortcut for Actionscript. You can code in mxml instead of Actionscript and the compiler will convert your mxml into Actionscript before compiling. You can't use mxml as a shorthand for all AS coding. Mostly you can use it as a substitute for UI coding and as a way of binding data to UI elements. The compiler converts the mxml into Actionscript classes and then compiles the Actionscript classes (the ones created as mxml and the ones coded natively in Actionscript) into bytecode. The Flash virtual machine (e.g. the browser plugin) runs the bytecode.

Currently, you can code both Actionscript and mxml -- and then compile using Flex Builder/Flash Builder or the mxmlc compiler (which is free). Flash CSx can does not understand mxml, so you it can only compile straight-forward Actionscript.

Note: there are third-party tools, such as FDT that can also be used to write and compile Actionscript and mxml.

The language Actionscript has been revised several times. After a brief phase when it was a proprietary language, it morphed into something much like Javascript. Then, with AS 2.0, it became much more like Java -- and it continues in this direction with AS 3.0. (its syntax is very similar to Java and, like Java, it is class-based).

There are a core set of Actionscript classes that are available to you in Flash CSx, Flex Builder/Flash Builder and the free sdk. There are additional classes, known as the Flex Framework, which are available to you in Flex Builder/Flash Builder and in the sdk -- but not in Flash CSx. These extra classes add new visual components, such as a datagrid, an advanced UI-layout engine, and a framework for data-binding.

You can use the Flex Framework without the Flex Builder IDE (which is going to renamed, in the next version to Flash Builder).

Compiling without Flex Builder

You can also use Flex Builder/Flash Builder without using the Flex Framework -- meaning you can program in the IDE and use only Actionscript classes that aren't part of the framework (the classes you'd use if you programmed in Flash and not Flex Builder).

You can choose to use or not use mxml.

You can even use mxml to auto-generate Actionscript that's not part of the Flex Framework (e.g. your own custom classes).

Using mxml for your own classes

Good luck! my Actionscript blog

这篇关于我可以在没有Flex Builder的情况下使用Flex吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆