www.fgks.org   »   [go: up one dir, main page]

Source Files


Flash & Games & Source Files07 Mar 2006 05:42 pm
Macromedia Flash MX 2004 Game Programming (Game Programming)   

The last book I worked on was Macromedia Flash MX 2004 Game Programming which was part of that big book series with the green spliny landscape on the front. The book was originally for Flash 6, but then Flash 7 appeared on the horizon and was re-factored for 7. As with most of the books that come out right after a product release, the concepts are still tied a little too much to the previous version since the authors haven’t really gotten into the workflow of the new version yet. This book was no exception. AS 1 abounds and the new features are only touched upon.

Also like most books that try to ride the wave of readers wanting to learn about a new version, the book doesn’t have staying power and goes out of print pretty quickly. Once again, no exception. The strange thing though is that the book seems to be doing better than ever despite being severely out-dated and out of print. I get email regularly asking for the files from the CD. It turns out that the book is available on Safari Bookshelf (without the relevant files). Also several community colleges decided to use the book as their text book.

All of this leads to a really funny email I got from a reader today. Ron writes that he was thinking about buying the book used on amazon just to get the CD but when he checked, the book is being marked up. Like all technical books, it retailed for $49.99 USD and was often marked down. In the used section of amazon there are three copies available ranging from $110-$141USD! Why on earth is there such a market for what amounts to a Flash 6 game development book plus a gentle introduction to OOP by someone who in retrospect really wasn’t qualified at the time to say much on the subject (me)? Most of my other titles are running at an average of $3 USD.

So if anyone wants to overpay for my book, let me know. I have signed collectors editions all set (well, I will once I go find a pen). ;)

If you are one of those Safari Bookshelf readers that is looking for the CD source. There you go. If however you are from my publisher, Premier Press, let me know if you don’t want me putting the source up. At that point you can also explain why I don’t get royalties from the Safari readership. ;)

Design & Devices/Phones & Flash & Flash Lite & Source Files28 Feb 2006 11:31 am

Here are the source files and PPT for my presentation this morning. I will add to this post in a bit.

Flash & Source Files07 Feb 2006 03:42 am

Radar Maps

Please feel free to download the source for the radar skin of the Yahoo! Maps API. The zip contains the map FLA/SWF and relevant class files.

A couple notes about the file:

Skin filters and Color Transformations:
Off to the right of the stage in the radar Map movie clip there is a broken apart vector image of a map. All of the filters that I want to apply to the dynamic map are actually applied to this colorTester movie and then programmaticly copied to the map by the RadarMap class in the applyFilters function.

By setting it up this way, I can see the filters and adjust them as a designer but take advantage of them as a developer. I always hate writing out code for doing setTransform and for filters. I almost never just write them anyways, I would apply them to a symbol, write down the values and then fill out the code. now I’m just saving a step and making the design step a lot easier too.

(for those of you that read the previous post on the Pirate Maps Source, sorry for the redundancy. I just wanted to have each file listed separately in my blog, but I did want to provide the context for people coming straight to the page).

Flash & Source Files06 Feb 2006 04:23 pm

Pirate Map

Well, that took me longer to get around to than I expected :)

Please feel free to download the source for the pirate skin of the Yahoo! Maps API. The zip contains the map FLA/SWF, the relevant class files, and the FLA/SWF for a custom marker. This is a little more robust than the example I posted a few months ago. I refined the graphics a bit, but also included a search box that gets X to mark the spot. :)

A couple notes about the file:

Classes:

  • Pirate Map: This is the main application class, and it is attached to the single movie clip on the stage when you open the main FLA. It manages the skin, and listens to the child elements to implement the search and zooming results.
  • MapZoom: This manages the internal function of the spyglass and is pretty specific to the spy glass approach to zooming. The actual value to zoom to is broadcast out to listeners so that the application can decide what to do with it.
  • YLocationSearch: This class manages a textfield, button and load indicator (along with the various success/error events) for searching for a location. search requests are broadcast out so the application can decide what to do.

Skin filters and Color Transformations:
Off to the right of the stage in the Pirate Map movie clip there is a broken apart vector image of a map. All of the filters that I want to apply to the dynamic map are actually applied to this colorTester movie and then programmaticly copied to the map by the PirateMap class in the applyFilters function.

By setting it up this way, I can see the filters and adjust them as a designer but take advantage of them as a developer. I always hate writing out code for doing setTransform and for filters. I almost never just write them anyways, I would apply them to a symbol, write down the values and then fill out the code. now I’m just saving a step and making the design step a lot easier too.

Adobe & Flash Lite & Source Files & Yahoo!25 Oct 2005 11:45 am

I’ve just uploaded the FLA and PPT files for my “Advanced Flash Lite Development” session at Macromedia MAX. Thanks to everyone that attended. If you were at the conference but couldn’t make it to the class, I’ll be doing a breeze version for the MAX presentation library soon.

This zip file has the FLA for Flickr Flash Lite tag search, a Yahoo! Word of the day lookup, and a simple battery check application. I’ve included the PowerPoint file and word doc of instructions for using the FLAs.

MAX was really great this year. First it was enormous!! I think they said that it was over 3000 people. That doesn’t sound like much until you see the sea of chairs at the keynote. Even with the room full of seats, there was still standing room only.

I was really pleased to see that two of my Flash Lite applications were demoed in the keynote. NYC traffic was shown as B-roll in a video about the Macromedia Nokia partnership. Bill Perry also showed the Flickr tag search as his demo of the Flash 8 Mobile Emulator.

When not teaching my sessions, my time was split between being at the Yahoo! booth, and attending sessions. My favorites were the mobile track sessions. I was particularly impressed with Robert Hall’s Flash on every screen, a tour of Flash off the PC, and Macromedia XD team’s 3-hour session on mobile experience. I can’t say I completely agree with every point from the XD session, but it did give me a lot to think about. Who could ask for more from a session.

Last year I got home and immediately started working on Flash Lite. This year, I’m re-energized on Flash Lite, but I also left the conference with the device bug. I can’t wait to play with the iriver U10, the media player with one of the most interesting input styles I’ve seen (which also runs Flash Lite for its UI!). I’m also really impressed with the new Kodak easy Share One which also runs Flash, and was engineered by Greg Burch.

Flash Lite & Source Files20 Sep 2005 02:58 pm

If you develop for Flash Lite 1.1, FlashLite Writer Toolkit is a very good and very simple solution for converting JPG files to SWFS on the fly.

For the last year I have been using Flash Writer Toolkit from bronson beta. I’ve been very pleased with it. It is super easy to use, it only has three small PHP files and has no dependencies on any other libraries. I have however been a bit tight lipped on it though, not because I didn’t want to tell people how cool it was but because it had one serious flaw.

The PHP file is old. If was made in the days of solving the problem in Flash 5. Because of that, you have to make a small modification to let the file even open in Flash Lite (based on the flash 4 player). Beyond that though was the more serious issue that It was built for an older version of PHP. Methods like fopen work differently now and the tool simply didn’t work in the newer versions of PHP.

My skills at PHP are very much in the dabbling area and debugging an application that is reconstructing a binary file was really not going to be an afternoon project for me. Laziness won out and I just installed an old version of PHP. Finally I’ve gotten around to tweaking the original source and the example to be particularly useful for Flash Lite.

It turns out that there really wasn’t much to change, but since posting a revised copy is much easier than explaining what to change over and over, here you go. ;)

To use the files, just drop all three in a directory on a webserver running PHP. You should only need to modify the jpg2swf.php file. You just supply a URL and you are off to the races. When laziness is beaten back once more, I really need to add support for the GD libraries to resize images, auto rotate them and do all the other fun stuff that GD 2 does.

Thanks to Henri who mercifully ended my confusion on several PHP things.

Next Page »