|Getting started with Flash development|
|Tuesday, 23 November 2010|
Page 1 of 4
Origins of Flash
First you need to know why Flash is so difficult for a developer to get into. Flash started life as a way of creating multimedia content, mainly animation, for web pages. As time went on it acquired a programming language - ActionScript - and an extensive framework - Flex.
Unfortunately if you try to use it via the standard Flash IDE - Adobe Flash CS4 - then you will have to look fairly hard even to find it. Adobe Flash CS4 is roughly the equivalent of Microsoft Blend and you wouldn't attempt to create a .NET project using Blend - well not anything even slightly complicated. CS4 does have buttons and other components but the most prominent feature of the overall interface is an animation timeline and for most developers this just gets in the way.
The correct place to start is to use FlashBuilder. This is more like Visual Studio and provides an IDE for developers to use to create applications.
Flex is the ActionScript framework that provides all of the components and classes you need to build an application and to demonstrate how important it is FlashBuilder used to be called FlexBuilder until the version 4. FlashBuilder is an IDE that integrates ActionScript and Flex.
In case you are wondering where "Flash" comes into it at all - this is the "player" that hosts the virtual machine (VM) that runs your application. This is the equivalent of the Silverlight add-on that runs .NET applications in a browser.
Finally there is AIR (Adobe Integrated Runtime) which can be used to run a Flash application on the desktop. You can think of AIR as being similar to the .NET runtime but it came last in the development of things.
Indeed you can see Flash as starting out by using the browser as a way to build animation and special effects and working its way to the desktop and a general purpose programming environment whereas .NET started a general purpose programming environment for the desktop and has worked its way to a browser add-in that can produce animation and special effects.
This is the reason Flash is tough to get into for the developer and .NET is hard to get into for the designer.
There are some other issues however.
Perhaps the biggest hurdle for a .NET programmer in getting to grips with Flash is that FlashBuilder is designed as an Eclipse add-on. There is nothing wrong with Eclipse but it isn't Visual Studio and it has its own sometimes strange ways of doing things. There is also the fact that it is sometimes idiosyncratic and often slow - a feature which causes it to appear even more idiosyncratic.
Despite the fact that Eclipse is free to download and open source, FlashBuilder is a commercial product. You can however download it and use it for 60 days for free and this should give you plenty of time to find out if it is a suitable development environment.
The examples in the rest of this article all use FlashBuilder 4 but using the previous FlexBuilder 3 is very similar if not identical.
You can either download the full standalone version or an Eclipse add-in. Clearly if you have Eclipse already installed then the add-in is a good choice but even in this case the standalone application has the advantage that it "just works" and can be removed in one easy step if you decide that you really don't want to use it.
As with all new languages and environments, the best way of getting started is to write the simplest possible program - hence "hello world".
If you download and install FlashBuilder 4 it starts off configured ready to create all types of Flash projects.
The simplest option is to create a Flex project - which can contain multiple applications but for the moment we will concentrate on just one.
Create a new Flex Project called Hello World:
Creating a new project
|Last Updated ( Tuesday, 23 November 2010 )|