My Experience with Flash

I agree with most of those who have said this already, Flashes real advantage is that it consistently works. If I’m running an old version of Flash it will tell me and offer to update. If I am running an old version of Java then the applet will crash making me think that your game doesn’t work (when it’s actually my fault).

You can still make some amazing stuff in Java, there is nothing to stop you building your own amazing high-end 3D engine and you can potentially build nicer stuff then you can in Flash. But applets were never really popular and tbh I think they are on the way out now. There is a huge wave of technologies (old and new) which are making plugins redundant. If you want to play a video with Java you still need to use the terrible JMF where as if you visit youtube today with Chrome you don’t need any plugin at all. If you want to make a proper app you can use GWT to compile Java to Javascript, removing all those runtime issues. For games WebGL is being developed for 3D in the browser; no need to sign any certificates.

Flash has a big enough foothold and enough professional Flash developers to survive this wave (at least for a while). But most of all Adobe are very interested in improving Flash, keeping it alive for people to continue to use it. Sun have improved applets over the last few years, but thos have been minor.

Now that the Oracle-Sun merge is complete, maybe Oracle will take client side more seriously by investing more money.

I program in ActionScript daily for my work (result is here: magic.cyclopath.org) and I will tell you that ActionScript is definitely not a pleasant language. Although it has classes and typing, and event listeners their organization is abysmal. I honestly prefer the JavaScript language to ActionScript (ignoring the inconsistencies between browsers, which isn’t technically the language’s fault).

What do you mean by “organization”, the standard library? I just wanted to make a point that ActionScript isn’t nearly as bad as 5 years ago. Although the user base hasn’t really matured, if you look at Adobe’s forums the majority of questions about ActionScript are about trivial problems.

Yes, I still get annoyed by the overlap with the artist’s legacy of AS 2. Basing everything around MovieClips and the timeline has crippled Flash, IMO, for many years to come (as a programmer’s language). However, you are right that AS 3 is a big step forward.

I worked with flash for almost five years. AS3 is ALMOST good, and it’s much better than AS1 or AS2 ever were.

And xml parsing in flash is perfect. It’s better than in any other language ever. Java probably has the worst xml parser system ever.

Speaking as someone who runs 64-bit Linux I have to disagree with you.

Ok, I concede. It only works consistently on 97% of desktop PCs.

That’s still way ahead of Java!

I think another case in this discussion is the fact that Adobe Flash CS3 or CS4 cost over $700 unless your a student or along those lines whereas the JDK is free.

This will ultimately cause a pretty big problem for me due to the fact that I cant afford to purchase something like that for my meager little indie endeavors and adventures.

I didnt take a look at AS3, but from what I read and seen, it does look more to be quite a full scale library. Demonpants pretty much said what I failed to say in the first post. It takes quite a bit to manipulate the movie objects and keep track of layers and timelines to put everything together. Of course it was my first experience with it so I’m sure over time I would get used to it. I just feel more comfortable with using Java to build stuff from the ground up where with flash your forced to use the movieclips, layers and timelines.

It was still fun though.

I do mean the standard library. Often times I’m forced to write utility functions for Strings or other data types that should exist already. Their Array class is bastardized hybrid of an array and a Java’s Vector/ArrayList (and now they’ve added a Vector class that’s really just the correct form of an array). There’s poorly documented differences between


for each (a in list) { }

and


for (a in list) { }

Their security sandbox is a joke and a pain in the ass, for example they don’t allow you to write to a file from within actionscript after a user goes through the file picker. They will however let you make unrestricted http requests back to the hosting server, and users can download files from the server via actionscript (so really, the client just writes the custom file to the server, then holds onto some key so that the user can re-download it).

Most of this was just a very necessary vent. I will agree that AS3 is much improved, and that their XML handling is very nice. Also the MXML language is pretty nice to use. Last point, I was able to make their compiler crash with valid syntax, so …

I’ve done that to javac a few times in the past decade.

Fully agree, although ActionScript is not the only language that uses arrays like that. PHP is even more flexible, you have something called an “array” which is basically the only data structure in the language. This is just silly:

$foo = array("a", "b");
$foo[0] = 1;
$foo["john"] = "fred";

Aye, me too. =)

The one in our case was

for (int k=0; k<100; k++)
{
    int j = 10;
    for (int i=0; i<100; i++) {
        System.out.println(j);
        j = 0;
    }
}

It crashed as soon as it got JITed. The good news is that the JIT does loop peeling. :smiley: