So, many of you have sent me emails or asked me in person about how, exactly, to get started playing with the Flex SDK without having to pour any money into unnecessary resources or IDEs. First, let me say that purchasing and using Flex Builder will be one of the best investments you can make in your Flex development learning, but yes, you can indeed download the SDK free of charge and manually compile AS3 and AIR applications. This will be a very simple post dealing with just how this can be done. While there are many, many, many details we could approach, I want to tackle this issue in its simplest form and hopefully get people on the ground running within minutes of reading this post. Please note that this will be written for Windows users, though I highly recommend people set up a Linux environment and play with the command line tools there as well, if possible.
Continue reading
Tag Archives: Flex
Dynamic XML Slideshow in AS3
Over the past year or so, I have been responsible for developing and maintaining a JavaScript Slideshow component for our internal CMS. With the similarities between JavaScript and Actionscript, I have wanted to implement this slideshow in a manner consistent with the flexibility and usage of the JavaScript version. The biggest difference is that the JS one is focused on content, and the AS3 version will be focused on pictures – since AS3 does not fully support markup and CSS yet. This being said, I have had opportunity to attack my project and have the first phase completed. As with so many of my other personal projects, I’m tackling it in phases rather than having a defined spec list ready to go. In this case, I have the slideshow reading an image list from an XML document, loading the individual pictures and setting them on a timed rotation.
Continue reading
Tower Defense in AS3 – Part IV
Many of you have been waiting patiently for this post, and let me say that I have worked many hours to get this where it is today. I wanted to get my code to the point where it was solid enough that I would actually publish something with it, and I believe it is there. Thanks to those who have encouraged me to finish this post, and I look forward to seeing how it is used!
In introduction, let me say a few things about this post: first, I have tried to alter my scope slightly in order to be more accessible to readers who may not have access to a full licensed copy of Flash. So, to help with that and make these lessons more accessible, I have decided to write them in such a way as to be compiled by the Flex SDK, a fully open source framework to allow anyone to build robust Flash applications. I prefer to use the full Flex Developer 3 for development and release, but even without it, you can compile full AS3 or Flex applications using only the SDK from the command line. One other major benefit to doing my development with Flex Builder is the ability to publish my source code for all to view online as well as download.
Obviously, this opens up the accessibility to a much broader range of individuals looking to learn Actionscript 3 or Flex. So, all this to say that the code in this post, while doing practically the same thing as the previous posts (and keeping the majority of the same logic), cleans up a ton of structural issues to lend itself more cleanly towards a completed project. That being said, we are simply focusing on the Tower object itself this time. I will leave it to your imagination and time to read through the rest of the cleaned – and fully documented, I might add – code. I may find time to write some more generalized posts on the Flex framework itself in days to come, but for now, suffice to say that the main file that is compiled as the application (in our case, called “MagicTD.as”) will be instantiated as the main() function and will serve as our entire platform base. You will notice on line 12 of this file all the variables needed to set up our SWF with the desired dimensions, background color and framerate.
So, without further ado, let’s jump right into our Tower class.
Continue reading