FlashGameU.com Podcast 2: About the Book
Submitted by rosenz on Fri, 08/03/2007 - 12:00.Learn about the book ActionScript 3.0 Game Programming University.
Transcript:
G: Hi, and welcome to the Flash Game University Podcast episode number 2.
W: Or welcome back if you've just listened to our first one.
G: This is...we're at http://flashgameu.com. I'm Gary Rosenzweig and with me is William Follett.
FlashGameU.com Podcast 1: Introduction
Submitted by rosenz on Tue, 07/31/2007 - 19:18.Gary Rosenzweig and William Follet introduce the FlashGameU.com Web site and podcast.
Listen to the podcast.
Transcript:
G: Hi and welcome to the first podcast of Flash Game University, http://flashgameu.com. I'm Gary Rosenzweig and with me here is William Follett.
W: Hello.
G: We're going to start off by doing a short series of audio podcasts about http://flashgameu.com, about the book, ActionScript 3.0 Game Programming University by me.
Ask Gary: Creating a URL Button the AS3 Way
Submitted by rosenz on Wed, 07/25/2007 - 19:31.Swearingen wrote:
I can't WAIT to buy and read your book. I've been peeking at the source
files and already have the book on advanced order!
I'm still getting my head around the newness of AS 3, so here's my
specific question about the Word Search game.
I would like to modify it so that in each frame (intro, play and gameover)
I could have a button scripted with either a skip or enter function to get
to a specific URL.
I tinkered with movieclips and instances, then tried to copy how you set
up the buttons, but no luck.
How would I put a button linking to a URL on each frame of the game?
Thanks so much!
Creating a button in Flash 9/AS3 is a totally different process than in previous versions of Flash. In Flash 8 and before, you would create a button symbol, place it on the stage, and attach a script to it. Something like this:
_root.getURL("http://flashgameu.com");
}
But with AS3, you can't even attach a script to a button, let alone use the getURL command anymore. Instead, you need tell Flash that you want to listen for a mouse event on the button, and then to run a function when that even occurs.
So the first step is to name the button. Select it on the Stage and use the Properties panel to set its name to "myButton" or something like that.
Then, in the main timeline on the same frame, add a script like this:
function myButtonFunction(event: MouseEvent) {
var request:URLRequest = new URLRequest("http://flashgameu.com");
navigateToURL(request);
}
The first line tells Flash that when the user clicks on myButton, it should run the function myButtonFunction.
This function does the equivalent of what getURL used to do. But now it is called navigateToURL. Instead of taking a pure string as a URL, it needs a URLRequest object, which in turn contains the URL string.
One last thing. If you already have a document class .as file assigned to the movie, you may need to add import flash.net.*; to the list of imports. You can also add it to the top of the frame script. If you are not using a class file, then Flash assumes this.
This simple button is a rare example of something that takes more steps in AS3 than in AS1 or AS2.
Ask Gary: When Will the Book Be Released?
Submitted by rosenz on Tue, 07/24/2007 - 13:00.Tan Gekhua wrote:
When I look it up at Amazon.com, it says "August 29, 2007" and that sounds about right. All work is done on the book, and it is just a matter of production and distribution now.
There is a "Rough Cuts" version of the book available online right now.
Thanks.
Added Table of Contents to Site
Submitted by rosenz on Mon, 07/23/2007 - 15:06.I just posted the table of contents to the site. There is both a summary and a detailed version which includes subheadings.
FlashGameU.com Web Site Launched
Submitted by rosenz on Fri, 07/13/2007 - 21:34.I've been working on the site a lot today. Not much here, yet, but I think it is time to launch. The forums should be operational, so you may start conversing there. Also, the "Ask Gary" contact form is up, so you can click on the top link on the left sidebar to ask a question, and I'll see if I can answer it in this blog.
For those of you previewing the book through the Safari IT service (http://safari.oreilly.com/9780789737021) you can now register at this site and get the source files. Let me know if you have any issues with any of them. Since I'm running this site myself, I've got the power to update the files if necessary.
Check back here for more blog posts soon. I'll get a table of contents up in a bit.
Writing Complete!
Submitted by rosenz on Wed, 06/13/2007 - 01:57.I've completed writing all of the chapters of "ActionScript 3.0 Game Programming University" and we are now at the editing stage. The release date is set for Oct. 4. Here's the preliminary front cover:

You can already pre-order the book through Amazon:
Pre-Order the book
Copyright Gary Rosenzweig
