Adobe Flex

From EduTech Wiki
Jump to: navigation, search

This article or section is a stub. A stub is an entry that did not yet receive substantial attention from editors, and as such does not yet contain enough information to be considered a real article. In other words, it is a short or insufficient piece of information and requires additions.

Draft

(This page needs updating to Flex 4 - Daniel K. Schneider 14:22, 9 November 2010 (CET))

1 Definition

“Adobe Flex is a software development kit and an IDE for a group of technologies initially released in March of 2004 by Macromedia to support the development and deployment of cross platform, rich Internet applications based on their proprietary Macromedia Flash platform.”. (Wikipedia, retrieved 15:49, 6 September 2007 (MEST)).

SWF files generated by the Flex SDK require Flash Player 9 or above.

History: In April 2007, Adobe announced that the Flex SDK would be released open source. A visual programming environment was provided in the form of the Flex Builder that was to remain proprietary and commercial. Since october 2007 it is free to students and educators (upon request).

The Adobe Flex software development kit (SDK) supports:

  • MXML, an XML-based user interface markup language.
  • ActionScript 2/3 programming

This is just a short overview article. Basically, with Flex you can write Flash applications just by coding. Roughly speaking, you have to learn how to use the Actionscript 3 classes with ECMAScript and you may use MXML for faster development of the User Interface. So - conceptually speaking - it's Java made easier. The result - of course - is a Flash "swf" (Movie) file. In a short flow formula:

ActionScript + [ MXML ] -> compilation -> Executable flash (swf)

This entry is part of the Flash and ActionScript series of articles.

2 Installing the free Flex SDK

Getting the Flex SDK from Adobe
  • Download this free SDK from Adobe:
Free Flex 4 SDK (nov 2010), else try download or search for it in some flex page

The Adobe Flex 2/3/4 Software Development Kits (SDKs) are platform independant compilers that need Java 6 (or better) installed.

Installing the Adobe Flex2 Software Development Kit (SDK) for Windows
  • Unzip it somewhere, e.g.
c:\soft\flex
  • Edit the Environment variables through the configuration panel to include the flex ./bin directory in the path: I.e. something like Parameters->Configuration Panel->System->Advanced, then select Environment Variables (I don't have an English System at hand). E.g.
%Path%;c:\soft\flex\bin

If you don't know about environment variables, read setting a value in windows. Do not delete the '%Path%' element if you edit the user Path. Alternatively, if you edit the System path, keep all the existing paths or you will be in deep trouble.

Installing the Adobe Flex 4 Software Development Kit (SDK) for Ubuntu
  • Unzip it somewhere (I put it under /usr/local/flex)
  • Then you will have to fix all the permissions, they are all wrong. E.g at least open directories and make excutable files 775 for everyone (or try better):
find . -type d -exec chmod 755 "{}" \;
find . -perm /111 -type f -exec chmod 755 "{}" \;
  • Then add this directory to your path. E.g. under my Ubuntu I added in file /etc/bash.bashrc:
export PATH=${PATH}:/usr/local/flex/bin

else put this line into your private ~/.bashrc

Installing the Adobe Flex 2 Software Development Kit (SDK) for Mac OSX
  • Unzip it somewhere (I put it under /Applications/flex_sdk/flex_sdk2/)
  • Open terminal, go to the flex_sdk directory. Make sure the files in the bin directory have the right permissions. Type "ls-al". File details should start with "-rwx". If no "x" appears, type "chmod u+x *" to give execution permission to all files in that directory.
  • Then add this directory to your system paths. Go to your home directory ("cd $home"), edit the file (in the terminal window, type "open .profile" or "mate .profile" if you haveBut it is not a tutorial !! textmate installed). Add the path to the file.
export PATH=$PATH:/Applications/flex_sdk/flex_sdk_2/bin/

Save the file. Then make sure the profile file is being initiated.

source .profile

If you have the TextMate code editing software installed, download the Flex and AS3 Bundles for TextMate.

3 Flex Builder

  • You can testdrive it for 30 days (download)
  • Educators and students can get a serial number for free use by filling in a form

4 Writing ActionScript / MXML Applications

See:

  • MXML (for a short intro to MXML, the layout language)
  • Flex includes ActionScript 3 (minus the fl.* classes plus the equivalent mx.* classes). We don't have a Flex ActionScript overview, but see these Flash / AS3 articles to understand some general principles of AS coding:

5 Editing software / IDEs

  • To work with the SDK, you can use any programming editor, but you should check if your favorite editor has an ActionScript syntax mode. At least you should have syntax highlighting JavaScript, e.g. you also can check out web authoring systems. Basically you follow the same logic as Java development without IDE.

Otherwise check out:

  • Flashdevelop. Free and open source tool that provides syntax support and an interface with the Flex compilers.
  • Adobe Flex Builder, a commercial Eclipse plugin from Adobe. It is free for education upon request.
  • ... or use the built-in ActionScript editor in CS3.

6 Links

See also:

(stuff below needs cleaning up ....)

6.1 Flex components and style explorers

6.2 Adobe tutorials and resources

  • Flex - Getting started (As of nov 2010, quite a detailed Flex 3 tutorial that can be also consulted for platform neutral learning)
  • flex.org (an Adobe blog) aggregates Flex news from a number of sites. It includes MXML-related stuff.

6.3 Advanced tutorials

6.4 Examples

6.5 Other