Skip to main content

Posts

Showing posts from December, 2008

Flash for Programmers Part 2: The Display List

The Display List in ActionScript 3 is comparable to the DOM on a web page. Through the Display List you can add and remove your View components. I am not going to go into too much detail here are there are already many excellent articles about it online ( http://www.adobe.com/devnet/flash/quickstart/display_list_programming_as3/ ) ( http://developer.yahoo.com/flash/articles/display-list.html ). Suffice to say you will be calling addChild() and removeChild() quite frequently. I am going to give you a few practical tips though... Often (if you are doing truly modular MVC, which I will cover later), you will be firing off notes that may tell you to add and/or remove various components from the display list. You may fire a note which will ask to remove a child which doesn't exist though and this will cause your app to throw a nasty error. Just like in real life, I find it handy to name my children i.e. var dialog:Dialog = new Dialog(); dialog.name = "dialog"; this.add

Programmer's Guide to Flash: Part 1 - The Document Class

While Adobe came out with Flex specifically to create an IDE for programmers to create ActionScript/SWF applications, it is actually possible for programmers to use Flash CS3 (normally seen as a design tool) to create Rich Internet Apps. Most Flash programmers tend to regard Flex programmers in the same way that Web Developers regard .NET programmers. Flex (and .NET) programmers tend to be generalists who don't really know that much about interface programming and are afraid to get into the guts of a system. Flex itself is a 300k beast which may speed up your development, but it will slow down your application. However you are in luck. With Flash CS3 Development, the only really hard part is knowing where to start. Once you are over the initial hurdle, you will find yourself in code most of the time. Step 1: First of all, open Flash CS3 and create a new project (File -> New... -> Flash File (ActionScript 3.0). If you open the Properties Window you will see a box labelled