Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411558 Posts in 69384 Topics- by 58443 Members - Latest Member: junkmail

May 03, 2024, 09:41:24 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Flash/AS2 to FlashBuilder/AS3
Pages: [1]
Print
Author Topic: Flash/AS2 to FlashBuilder/AS3  (Read 2054 times)
Hinchy
Level 3
***



View Profile WWW
« on: April 12, 2010, 02:45:13 PM »

I've gotten so used to ActionScript 2 and the Flash IDE over the years that going to an all-code IDE and ActionScript 3 at the same time for Flixel is very, very jarring. I'm looking for some really good resources, preferably specifically help me "graduate" to Flash AS3. As far as moving from Flash Pro, the main things that really get to me are room/screen management and layout. I've already got C++ pretty down so I don't need a primer on general OOP, either.
Logged
BlueSweatshirt
Level 10
*****

the void


View Profile WWW
« Reply #1 on: April 12, 2010, 04:01:27 PM »

All I can say is do a lot of experimenting and tinkering to help ease you in, get comfortable, and learn the nooks and crannies of pure-code development.
Logged

roboprez
Level 1
*


Got to love them pixels


View Profile WWW
« Reply #2 on: April 12, 2010, 06:57:33 PM »

Jakman4242's advice is spot on. If your used to the Flash IDE I would suggest tinkering with AS3in that first. Try porting over old projects.
Logged

moi
Level 10
*****


DILF SANTA


View Profile WWW
« Reply #3 on: April 13, 2010, 06:20:01 AM »

Get Flashdevellop, it makes half the coding for you.
As for flixel, well you can study the mode demo, that's how I learnt.
If you already know OOP it shouldn't be too difficult.
Logged

subsystems   subsystems   subsystems
raigan
Level 5
*****


View Profile
« Reply #4 on: April 13, 2010, 06:35:34 AM »

I agree with moi -- though I haven't tried Flashbuilder or Flex, that's because I'm totally happy with FlashDevelop: http://www.flashdevelop.org
Logged
jotapeh
Level 10
*****


View Profile
« Reply #5 on: April 13, 2010, 09:13:44 AM »

Judging by the topic title, you already have quite a capable IDE (Flash Builder.)

First off, if you're new to AS3 but not ActionScript or OOP, you can check out Colin Moock's Lost Actionscript 3.0 Weekend:

http://oreilly.com/catalog/9780596801526

This one is particularly good because he covers some ways you can integrate your Flash IDE experience with Flashbuilder (eg., SWC embedding.)

If you're more advanced and simply want a reference, his book "Essential Actionscript 3.0" is great too.
Logged
Richard Kain
Level 10
*****



View Profile WWW
« Reply #6 on: April 13, 2010, 10:29:16 AM »

The first thing to wrap your brain around when dealing with AS3 is that everything in your program is going to be an object. Some programming languages are procedurally based. Not AS3. AS3 is object-oriented out the wazoo. The .AS source files you write are all templates for objects.

Tip #1 - Every .AS file is a class
The general methodology is that each class you write in AS3 will occupy its own .AS file. This is a good practice to follow, as it helps to keep things organized properly. It is actually possible to write and use multiple classes in the same .as source file. But you have to be careful when attempting it, and there are several restrictions to follow. It's also not common for such a practice to be overly useful. So as a general rule of thumb, one source file, one class.

Tip #2 - Source file importing
the packaging system in AS3 helps you to organize your files. It is especially useful once your project is up and running, and you want to go back and optimize it up a bit. Importing source files into a class gives you access to all of the code in those source files. It will allow you to create an instance of a class within another class. One rule to remember is that you don't need to import a source file if it is in the same folder as the source file that you are calling it from. If all of your source files are in the same folder, you don't actually need to do any importing at all. You can just call those classes as you please.

Tip #3 - Extending classes
A useful feature of AS3 is class extension. Basically, you can create a class that extends an existing class. All of the code from the original class will be accessible to the new class. This is especially useful for creating "template" classes. Flixel uses class extension frequently, so understanding how this works can help you to work with it.
Logged
levelbylevel
Level 0
**



View Profile WWW
« Reply #7 on: April 14, 2010, 04:36:39 AM »

Not sure if this would help any, but I made a simple flixel game template, which has the basic state layout for a game.

Preloader -> Splash -> Menu -> Play -> Gameover -> Menu etc.

If you're interested, the blog post and download link is at http://www.levelbylevel.com/blog/flixel-game-template/

I might be useful to at least see how using states for levels/menus works. Also has some text layout and a very simple animation loop.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic