stenrap
02-14-2009, 06:47 PM
Hi all,
I'm trying to wrap my brain around the relationships between ActionScript, the Flash authoring tool, mxmlc, and Flex Builder.
I began a project in the Flash authoring tool and quickly discovered that I'd prefer to control everything with ActionScript instead of the timeline (what can I say, I'm a software engineer by trade). This has mushroomed into a frame script with over 4,000 lines of code! Clearly I need reuseability and an object-oriented approach, so I will be developing classes in external .as files. However, having just finished reading Essential ActionScript 3.0 (the "Colin Moock book"), I'm still not sure how best to develop my project, include my .as files, and compile. As a result, I have a few questions:
1. When I create my classes, should I put them in a named package or the unnamed package? I'm leaning towards the unnamed package because apparently mxmlc and Flex Builder require them to be in the unnamed package, and just about every code example I've seen in Adobe's language reference shows classes in the unnamed package.
2. For my classes that represent displayable objects, should I extend MovieClip or Sprite? I think Sprite is the answer for external .as files, but only because that's what the Adobe examples show and the EA3 book recommends. I'm not sure why one or the other is better.
3. I can buy Flex Builder Pro for just $45 through my university's student discount. Is it worth it? Should I just use mxmlc for free, or am I really going to want Flex Builder Pro?
4. If I do buy Flex Builder Pro, is there any reason to use the Flash authoring tool ever again (why have both)?
5. Any other recommendations or best practices for me?
Thanks,
Rob
I'm trying to wrap my brain around the relationships between ActionScript, the Flash authoring tool, mxmlc, and Flex Builder.
I began a project in the Flash authoring tool and quickly discovered that I'd prefer to control everything with ActionScript instead of the timeline (what can I say, I'm a software engineer by trade). This has mushroomed into a frame script with over 4,000 lines of code! Clearly I need reuseability and an object-oriented approach, so I will be developing classes in external .as files. However, having just finished reading Essential ActionScript 3.0 (the "Colin Moock book"), I'm still not sure how best to develop my project, include my .as files, and compile. As a result, I have a few questions:
1. When I create my classes, should I put them in a named package or the unnamed package? I'm leaning towards the unnamed package because apparently mxmlc and Flex Builder require them to be in the unnamed package, and just about every code example I've seen in Adobe's language reference shows classes in the unnamed package.
2. For my classes that represent displayable objects, should I extend MovieClip or Sprite? I think Sprite is the answer for external .as files, but only because that's what the Adobe examples show and the EA3 book recommends. I'm not sure why one or the other is better.
3. I can buy Flex Builder Pro for just $45 through my university's student discount. Is it worth it? Should I just use mxmlc for free, or am I really going to want Flex Builder Pro?
4. If I do buy Flex Builder Pro, is there any reason to use the Flash authoring tool ever again (why have both)?
5. Any other recommendations or best practices for me?
Thanks,
Rob