Jump to content

  • Log In with Google      Sign In   
  • Create Account

Flash Vs Flex for programming


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
14 replies to this topic

#1 d000hg   Members   -  Reputation: 828

Like
0Likes
Like

Posted 12 November 2007 - 11:39 AM

Flash and Flex both allow you to code in AS3.0, to be honest I'm not entirely sure what the difference is except that I think Flash is geared more towards animations and art, whereas Flex is aimed at writing applications and doing programming. For programming, rather than making pre-canned animations, is there actually any real difference, since both use AS3.0? The choice for tools seems to be between CS3 or FlexBuilder, but if I wrote a bunch of classes in a Flash project could I use them in a Flex project?

Sponsor:

#2 NightCabbage   Members   -  Reputation: 100

Like
0Likes
Like

Posted 12 November 2007 - 11:55 AM

You'll want to use Flash for making a game :)

Flex is pretty much an easy way to make pretty charts, etc.

It even exports its files in the Flash format.

#3 d000hg   Members   -  Reputation: 828

Like
0Likes
Like

Posted 12 November 2007 - 12:08 PM

That's not my experience with Flex. If you're used both, can you explain how it's actually different? If not, please don't post what you've been told by others.

#4 NightCabbage   Members   -  Reputation: 100

Like
0Likes
Like

Posted 12 November 2007 - 01:00 PM

Well, I'm an experienced professional with Flash, but I haven't used flex before.

They have different development workflows by the looks of it, but I'm unable to tell you very much about Flex.

What I'm getting at though is that Flash will do everything you want. Why are you looking towards Flex?

Is there something that you want that Flash doesn't do?

#5 Maxamor   Members   -  Reputation: 361

Like
0Likes
Like

Posted 12 November 2007 - 01:50 PM

I think it's important to remember that Flex is geared toward "creating rich Internet applications". I would see this geared toward data-heavy internet applications (forms, website statistics, shopping carts, etc.) which may or may not include games.

Can you build a game with Flex? Sure.

Should you? Possibly not. Why not just build it in Flash? As you said, Flash is geared toward "animations and art" which most games are made of.

If you're going to be using a large data store for your game, then maybe Flex is a good idea.

#6 pinacolada   Members   -  Reputation: 834

Like
0Likes
Like

Posted 12 November 2007 - 02:03 PM

They are just different tools that produce the same thing.

What Flex gives you is a bunch of command line tools and a large API to work with. You write stuff in either MXML (which is similar in form and function to HTML) or Actionscript. You can write the code in your own text editor, or you can use the Flex Builder IDE (which is a glorified Eclipse plug-in).

There aren't any tools in the Flex SDK for drawing images or making animations, but you can write Actionscript code that imports that stuff. So, Flash and Flex aren't mutually exclusive, you can make content in Flash that you import into Flex. Or you can build things in Flex that you import into a Flash project.

So yeah, your initial hunch was about right: Flash CS3 is more for artists and Flex is for programmers.

#7 d000hg   Members   -  Reputation: 828

Like
0Likes
Like

Posted 12 November 2007 - 08:38 PM

Let me give a small amount of information (I'm under NDA):

The Flash/Flex application is the client for a multiplayer online game, sort of like a MMO. The artwork is not created by me, so I don't need to be creating animations and artwork - he can produce Flash graphics which I would import. So we are using Flash/Flex instead of Java/C++/C# for our MMO client application.

Doe this make any difference to your recommendations? The people using it will be programmers, not artists.

#8 NightCabbage   Members   -  Reputation: 100

Like
0Likes
Like

Posted 12 November 2007 - 09:15 PM

You could use either - do you have a personal preference for one or the other?

Mine is Flash.

In fact, you might be well off using both.

Even though you don't need to create art, Flash will still be better for handling movie clips, animations, etc.

But perhaps you'd like the Flex AS3 IDE better?

#9 d000hg   Members   -  Reputation: 828

Like
0Likes
Like

Posted 12 November 2007 - 10:53 PM

I've only used Flex, and I liked the interface because it was very similar to programming in Java/C#/C++. I don't know what using Flash would be like. I'll have to download the CS3 trial and see... I think in theory I prefer Flex because it seems to be more a programmer's tool but I could be wrong. It seems unlikely our application will need pre-designed animations, except those created by the artist and supplied in .fla format for me to load in the app.

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.

#10 Wyrframe   Members   -  Reputation: 733

Like
0Likes
Like

Posted 13 November 2007 - 05:33 AM

The company I work for develops training simulators, and for one of our recent projects we created a Flex web-based front-end which displays the simulator, and it connects to our Java-based simulation engine which is started by an inetd-like server whenever a request comes in from the Flex app.

It's not the flashiest (heh) thing in the world at the moment, but it looks just as good as the Swing interface which the simulation engine presents when not running in server mode. But overall, it is much easier to write the Flex UI in a more programmatic style than it is to try to assemble the same thing under the Flash interface and paradigms.

To summarize how our lead developer summed it up; Flash is for our artists, Flex is for our programmers, but there's plenty of overlap to go around.

#11 pinacolada   Members   -  Reputation: 834

Like
1Likes
Like

Posted 13 November 2007 - 07:48 AM

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)

#12 Wyrframe   Members   -  Reputation: 733

Like
0Likes
Like

Posted 14 November 2007 - 08:10 PM

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.

#13 Tesseract   Members   -  Reputation: 284

Like
0Likes
Like

Posted 15 November 2007 - 03:12 AM

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.



#14 Wan   Members   -  Reputation: 1366

Like
0Likes
Like

Posted 15 November 2007 - 03:42 AM

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)

#15 d000hg   Members   -  Reputation: 828

Like
0Likes
Like

Posted 16 November 2007 - 03:18 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS