Flash Vs Flex for programming

Started by
13 comments, last by d000hg 16 years, 5 months ago
Quote:Original post by d000hg
Is there anywhere which compares Flash and Flex? I had a quick search but I just got lots of results like "compare Flash/Flex to Silverlight" - I want to compare them from a developer's viewpoint.


It's a tough comparison because there is so much overlap, and because you can mix them pretty easily.

But anyway, a few things that Flex has over Flash:

Much of the Adobe API can't be used from Flash. If you look at the docs page, anything that doesn't start with "flash." can't be used from a Flash CS3 project. This includes stuff like: a suite of rich GUI widgets (this is what most people think when they think Flex), stuff for interfacing with databases, RPC, and more.

But I think the most significant difference is the difference in workflow. When coding in CS3, you have to write your code in pop-up dialog boxes (which I personally hate doing). And you attach your code to specific animations or frames, so all your snippets of code become scattered around the project like painted eggs on Easter. This works fine for simple games, but I wouldn't want to work on a large project this way.

With the Flex workflow, you get:

Choice of text editor
Ability to use source control
Easier to have multiple developers working on the same thing
Easier to share code
Better organization of your code (it's all in the same place)
On-the-fly highlighting of syntax errors (if you use Flex Builder)
Ability to write build scripts (for example, write a script that compiles and uploads to the server in one step)
Advertisement
In light of Piñacolada's post, I feel I should mention... Eclipse has an excellent Flex editing plugin. Makes it as easy to write and run Flex code as it is to write Java.
RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.
There really is no "Flash vs. Flex", unless you are talking specifically about the IDE. Flex is a framework built on top of Flash. They both use the same Actionscript. Flex gives you the ability to use, in addition to AS, MXML for creating interfaces. You could use the Flex IDE to build a game completely in Actionscript without using a single Flex component. The earlier comments which said Flex was more useful for building applications were correct; the Flex component save a HUGE amount of time when putting together a GUI.

The most elegant solution would probably be to use the Flex components to build the interface, and essentially build the game itself as a component which fits into the interface.

Quote:Original post by pinacolada
But I think the most significant difference is the difference in workflow. When coding in CS3, you have to write your code in pop-up dialog boxes (which I personally hate doing). And you attach your code to specific animations or frames, so all your snippets of code become scattered around the project like painted eggs on Easter. This works fine for simple games, but I wouldn't want to work on a large project this way.

Not necessarily. You can put your action script in separate files and include them in the application using the #include directive, pretty much like you would do in C. This means you can use your favorite text editor for programming. For small independent snippets of code though, it may still be better to put them in the 'pop-ups' to avoid having to go through the entire application's hierarchy of layers, time line instances, and parent/child relationships. I'm not sure about AS3, but in version 2 classes were even required to exists in a separate file (using the class name as its file name, like Java).


(O, and I never used Flex, so I can't help you there)
Just as an update, we decided to go with FlexBuilder for our ActionScript development.
Thanks to everyone who helped. And by the way anyone using Flex, try out the FlexBuilder3 beta. Pretty sweet.

This topic is closed to new replies.

Advertisement