I\'m aware that ActionScript 3.0 is designed from the ground up to be a largely object-oriented language and using it means less or even no timeline code in Flash documents.
If you are already familiar with AS2 (and you have experience with other languages as well), switching to AS3 shouldn't be too hard. There are a few places where things changed quite a bit: basically the event model and some widely used APIs, like flash.net (i.e., loading stuff, be it images, SWFs, sounds, XML, etc) and the display list (much more options than just movieclip, more coherent, reparenting, etc). Working with XML changed (for good) too and it's more powerful and easier (but you can use the old API if you feel like, it's still there). The bulk of the language itself hasn't changed much, though.
I'm sure you are aware of the potential problems of having code in the timeline. Well, the same applies to AS3, though some things like placing code on objects is not allowed in AS3.
I don't see a problem in placing stuff in the stage in the IDE and using movieclips for animations. IMO, that's why they're there in the first place. I know some people obsess about creating and positioning everything by code. I'm not one of those. For me, the IDE could be a good tool for layout, tweening, etc, at least in most cases (for some very dynamic stuff, on the other hand, you'd need to code the layout too).
So, I wouldn't outright advise against moderate use of timeline code. If it suits your needs, fits in your workflow and lets you do what you need to do without being an impossible to maintain (or even follow) mess, why not?
If at some point you need to put some stuff in classes, you refactor and move your code as you go.
From the examples you've given on how you use Flash, nothing has really changed to make any of that more difficult. There is no reason why you should use external code for all the above. You can work pretty much the same as before (gotoAndPlay
, gotoAndStop
still exist and work just fine). The only thing that comes to mind that is more tedious than it used to be is the fact there is no more getURL()
. However, Senocular has remade the getURL class and you can find it here.
I would say, only if your project is particularly code heavy, then move most if not everything into classes and structure it properly in an OOP manner. Heck, you can even just pass a reference to your stage to a base class and just operate pretty simply in that manner as well.
In your .fla timeline:
import com.yourdomain.Main;
var main:Main = new Main(this);
In your external Main Class:
package com.yourdomain
{
public class Main
{
private var mainTimeline:Object;
public function Main(_mainTimeline:Object):void
{
mainTimeline = _mainTimeline;
mainTimeline.gotoAndPlay("fScream");
}
}
}