开发者

How should a programmer go about getting started with Flash/Flex/ActionScript? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 3 years ago.

Improve this question

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开发者_JS百科 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:

What is Adobe Flex? Is it just Flash II?

Getting Started with Flex 3 UI ActionScript Programming

https://stackoverflow.com/questions/2123105/how-to-learn-flex


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.


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 :)


I would recommend you to use FlashDevelop + Flex SDK.

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


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


This should give a good start on learning this technologies:

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


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.


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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜