coldementia
September 6th, 2008, 01:56 PM
I've heard a lot of people say that the best way to code your game is to put all the code on the actual frames of the root timeline, as opposed to putting code on movie clips. Is this true? What is it about coding movie clips that is frowned upon?
senocular
September 6th, 2008, 02:00 PM
The idea is to centralize code to make it easier to find it. If everything is on the main timeline, and you open a new project, you immediately have access to all the code available in that project; you don't have to waste time going through library items to see what code may or may not be stored in their timelines.
However, since ActionScript 2.0, the best place is now in external class files. This makes all code accessible through external text files. Given that multiple files are used for many different definitions and purposes, its also (usually, with good naming) easier to find what you need in a collection of scripts rather than scanning through a huge mess of code stored on the main timeline.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.