views:

187

answers:

7

What is the shortest path between zero (ie no flash related development software on my computer or information about where to obtain it or get started) to running a "hello world" ActionScript?

I'm hoping for an answer that gives step by step instructions about exactly what software is needed to get started, an example of some "hello world" code, and instructions for compiling and running the code.

I've spent more time than I think should be necessary researching this question and not found much information. Hopefully this question will be found by programmers like me who want to get started with Flash/Flex/ActionScript (After my morning of researching I still don't even know what terminology to use so I'll just throw it all out there).

ActionScript tutorials I've found are focused on programming concepts, ie logic, branching, OOP, etc, and some even have code examples to download, but not a single one I've found explains how to compile and run the code. They all seem to assume you have an IDE standing by but no knowledge of programming, exactly the opposite of the position I'm in.

Here are the most related SO questions I've found:
http://stackoverflow.com/questions/59083/what-is-adobe-flex-is-it-just-flash-ii
http://stackoverflow.com/questions/554899/getting-started-with-flex-3-ui-actionscript-programming
http://stackoverflow.com/questions/2123105/how-to-learn-flex

+4  A: 

If you're a programmer, go down the Flex route. Flex is completely free to use and you can get a Hello World SWF in no time. You can use the FlexBuilder demo or the freely available but sometimes less helpful FlashDevelop. (Actually I think the only problem with FlashDevelop is it doesn't have a good debugger, or didn't, last time I checked).

That said, I would strongly advise against using Flex, Flash, or any Adobe product really, because in my experience Flex is a horrible API and ActionScript is a horrible language. Flash is still the best platform for RIA just because of its penetration, so if AJAX can't solve your problems by all means learn Flex. Certainly it's not impossible to work with. But Flex is like the Java library re-interpreted by a team of people who took one Java class in high school.

Anyway,

1) Get the FlexBuilder demo from Adobe: http://www.adobe.com/products/flex/flexdownloads/
I'm pretty confident it comes with the Flex SDK.

2) Start a new Flex project.

3) A basic MXML program is already written. Add <mx:Label text="Hello world" /> in the <mx:Application> tag

4) Run->Run YourProjectNameHere

5) Read the horrible Adobe documentation and Flex API reference.

leo-the-manic
Curious, what makes ActionScript, in your opinion, such a "horrible language" The OP might benefit from an explanation of such a strong statement.
Tyler Egeto
Well, I suppose ActionScript at its core is okay. It's JavaScript with some Java OO thrown in. It has optional type annotations, but Flex complains about them if they're left out, so for Flex it almost seems like it's statically typed. And then you get to the collections framework, which returns everything as an Object. So it's more the Flex library that I dislike, with its non-blocking network calls that aren't notated in any special way and the "callLater" function and others oddities and hacks.
leo-the-manic
I would advise to just write pure AS3, forget about the Flex framework for now.
Allan
As a programmer I liked Flex alot. The downsides of AS3 that I found being lack of data structures and algorithms that one often finds in the core libraries provided with other languages. Technically not an issue with the language itself, but it is a factor in the ease of development with the language.
AaronLS
I agree with leo-the-manic in that you should avoid Flex and flash if possible, despite its apparent hotness. Leaving the questionable quality of the framework code aside, the flash player has a lot of problems, and its so called portability leaves much to be desired. Probably not really Adobe's fault but major OS producers not being communicative enough, with big emphasis on "probably".
bug-a-lot
+2  A: 

The shortest path from zero to displaying a "Hello World" is probably the Flash IDE. Simply start the program up, enter something in the first keyframe like

trace("Hello World");

on the timeline and then click publish.

Of course you have to pay for the Flash IDE and if your just doing pure programming and not drawing complicated animations then there are free alternatives. The one that I and a few others keep pushing is HaXe. A free opensource language based on AS3 that can then be compiled and target to different platforms including Flash SWF. I use the free program FlashDevelop for coding and which supports HaXe.

An example (taken from the http://haxe.org/doc/start/flash website):

Define/create this class in a file named Test.hx

class Test {
    static function main() {
        trace("Hello World !");
    }
}

Create the file compile.hxml in the same directory with the following content.

-swf9 test.swf -main Test

Execute the compile.hxml, in FlashDevelop just right click on it, and you are done

That is all there is to it :)

Allan
+2  A: 

I would recommend you to use FlashDevelop + Flex SDK.

It is free, easy to use and nice for small and big projects.

M28
A: 

also, I know that adam flater and a friend of his were writing a blog around the time that flex3 was released called 'learning flex from scratch.' It might be a good starting point.

jeremy.mooer
A: 

There's a short Hello World tutorial on Senocular's blog, which deals with compiling AS3 code... might be a useful starting-point?

http://www.senocular.com/flash/tutorials/as3withmxmlc/

Richard Inglis
+1  A: 

Simple answer to your question:

I learned everything I needed to know to get started programming in Flash at http://www.gotoandlearn.com

Most of his free 20-minute video tutorials use the Flash IDE, but you can download a free trial that'll work for a month if you are just starting out. The first half or so examples he has are in AS2, so I'd disregard those unless you know you'll have to work on older projects - start with the "Using the Document Class" video. It's funny because he goes from a really shitty coder showing basic examples to a pretty advanced developer with nuanced tutorials. Watch his stuff and you'll get a good sense eventually of how this stuff works in Flash.

Another option that you have available to you is Adobe's "Flex in a Week" series - if you are more into programming and understand OOP concepts then maybe you'd rather not mess around in the Flash IDE. Jump right into Flex, which you can download for free for 60 days (or forever free if you're a student or unemployed) and then watch the videos here, they'll catch you up to speed:

http://www.adobe.com/devnet/flex/videotraining/

Between those two links you should have enough free video training to qualify you to do work in the field. Use what you learn there and practice and you'll be good at it in no time.

Cheers, myk

Myk
+1  A: 

This should give a good start on learning this technologies:

  1. Adobe Flash Tutorial
  2. Adobe Flex Video Training
  3. Adobe ActionScript Tutorial
Rachel