Gary Rosenzweig's

Developer Dispatch

News and Notes For Developers Using Flash, ActionScript, Director, PHP and JavaScript.


MY BLOGS
Developer Dispatch Blog
Flash Game U
iPhone Dispatch Blog
INFO & FEEDBACK
About Developer Dispatch
About Gary Rosenzweig
Gary Rosenzweig's Books
Feedback
Contact Gary Rosenzweig
SHARING
Add to Technorati Favorites
Add to Del.icio.us
Stumble Upon
LINKS TO MY SITES
CleverMedia
Free Online Games at GameScene.com
MacMost
Director Online
LINKS TO MY FRIENDS
Tech Support from Ask Dave Taylor
Ask Leo
Amy Gahran
Custom Stickers
Dean's Director Tutorials
Flash Website Templates
Time 4 Learning
RSS FEEDS
Raw RSS
Add RSS to your My Yahoo


12/20/06

Flash Frustrations

So in a recent project, I came across 4 Flash frustrations, or “Flashtrations” as I am starting to call them. These are basically bugs in Flash that are so annoying to a developer like me that it drives me mad. Here they are:


1. getURL and POST. Yes, I know that posting via getURL doesn’t work while testing. That’s at least a documented frustration. But it also doesn’t seem to work when in the browser. Well, it doesn’t work often enough, at least. I charted about a 10% failure rate. 90% of the time, the POST variables reached the server OK. 10% of the time they didn’t reach the server at all. It wasn’t about browsers, versions of Flash or firewalls, either. The same user would post fine several times, and then all of a sudden their post would be missing the variables. The solution was to go to a sendAndLoad LoadVars command, then get the result back, then do a getURL without any variables at all to complete the process. Three times as much work for me and the server.


2. Reseting movie clips. In Flash there is no good way to bring a movie clip back to it’s original state. Say, for instance, you have a movie clip that generates a bunch of internal movie clips to simulate a pull-down menu. That works great. Then, when the user makes his or her choice from the menu, it should remove all of those temporary movie clips to return the main clip to it’s original state. This often works OK, but not all the time. In my case, it worked the first time, but never again. Specifically, removeMovieClip failed to work, as well as the alternative unloadMovie. Levels set OK, debugging confirmed everything being executed OK, tried  hundred ways to do it. Flash just plain fails to remove the movie clips for some reason.


3. LoadMovie creates crippled movie clips. When you fill a movie clip with an external .swf, you can’t use duplicateMovieClip to make copies of it. The reason you would want to do this is so you can load external game pieces. For instance, say you made a chess game, but you wanted the chess pieces stored externally. So you had a chesspieces.swf that an artist could mess with. Each frame was a different piece. You would need to load the .swf 32 times to fill the chess board. You couldn’t just load it once and then duplicateMovieClip. The work-around is to create a board.swf externally that had a blank timeline and a chesspieces movie clip in it’s library. Then you could load the entire board.swf movie clip into a movie clip on the stage, and attachMovie inside that movie clip all you want. But you would never be able to place main timeline elements between the clips in board.swf. Plus, the external .swf is that much messier and hard to explain to artists.


4. Components are huge. Well, this isn’t a bug, but it is a frustration. I’ve spent my whole Flash/Shockwave career finding ways to save an extra K here and there on file size. I know some developers don’t care, but I do. You save on server bandwidth, and you save the user download time. So, my recent project was 20K. It just didn’t have that much in the way of graphics, it was mostly script. But I wanted to add a simple drop-down menu to it. The component would have been nice, but it clocked in at 50K! So I would have to go from 20K to 70K just to offer the user a drop-down menu choice. No thanks. I wrote my own drop-down in less than 1K. Of course, I had to deal with number 2 above.


7 Comments



12/13/06

Shockwave 3D Works on Intel Macs?!

I’ve really been amazed at how little information is out there about Director and Intel Macs. At first, I assumed that Director didn’t work on Intel Macs at all. Intel Macs use something called Rosetta to translate commands from PowerPC programs into Intel processor commands. But Rosetta isn’t perfect and I read that Director used things that Rosetta didn’t handle. Without a machine to test Director on (plus I was unwilling to go through the activation process just for a test), I had to assume that Director didn’t work.


But then I heard that Director did work. So all that early information was wrong. But I also heard that while Director worked, 3D would not. Makes sense since you couldn’t expect something as complex as Shockwave 3D accessing OpenGL to work. I mean, OpenGL on Intel Macs would be made for Intel processors, while Director would be made for PowerPC processors and translated with Rosetta.


So a friend of mine got a MacBook Pro and had Director on it. I had a chance to try it out, so I tried opening one of my 3D games. I wanted to see what nature of error message or crash happened. Instead, the game ran like a charm. Ah, I thought. It must be using Software Rendering mode, and the Core Duo processor is fast enough to make it work well. But no, it was rendering in OpenGL!


So, basically, Director works perfectly fine on Intel Macs. But try to find that information at Adobe’s site. You can’t. They really should be doing a better job of keeping developers informed about this sort of thing. I would have gotten a MacBook 6 months back if I had known.


Now if only Shockwave worked in Safari in standard mode, or Firefox at all (Firefox doesn’t seem to have a Rosetta mode).


1 Comment



12/06/06

First Look at the Wii

So I got to play with the Wii on Monday night at the Colorado Game Developers meeting. I loved it! Everyone was trying out the Wii Sports that comes with the console, though I did see a bit of Zelda too.


I resisted trying to play, thinking that I’ll get one eventually and there’s no point to playing for just a few minutes. But then I saw there was a bowling game, so I had to try that. Sure enough, you hold and toss the controller just like a bowling ball. You can throw it faster or slower, and even put some spin on the ball. Tons of fun. Then I played the baseball game. I anticipated that you would swing the controller like a bat, but you also get to pitch the ball by throwing the controller — well not literally throwing it, but by moving through the pitch motions.


My thoughts afterward were about how we were standing up and moving around when playing. Heck, my arm hurt the next day from bowling and pitching. That’s quite a difference from sitting very still pressing buttons on a controller. I felt like I was actually “playing” — more in the way you play sports or in a schoolyard as a kid.


It will be interesting to see how this changes gaming. It certainly has changed it for me. Getting a PS3 or a XBox360 suddenly seems boring when compared to the Wii.


Post a Comment



12/05/06

Switching to Free AOL

So I was doing my year-end accouting and was surprised to see that AOL is still charging me $7 per month for my bring-your-own-connection account. I thought they switched to “free” for this service back in August.


Some searches revealed that you are not automatically switched to this free service, you have to ask. Further research showed that all you need to do is enter the AOl keyword “Change Plan” and you go to a Web page that lets you switch with a few clicks.


I’m not really an AOL user, but I’ve had my AOL email address longer than any other (1993 or 94) and I’m sentimental about it. Plus, as a developer, it is worth it once in a while to check in and see how my pages look to AOL users. Also, I’ve used it more than once to reach an AOL user via email who has their spam filter set so high that they won’t even accept email from outside of AOL.


Well, anyway, at “free” the price is now right.





Post a Comment