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


04/25/07

New Version of Shockwave Released

Version 10.2.0.021 from what I hear. Seems the only real change is support for Shockwave 3D in Vista. Previously, something was preventing Shockwave from using DirectX, which meant that Shockwave 3D ran in software render mode instead of hardware acceleration mode.


Don’t have Vista on anything myself, so I can’t test.


1 Comment



04/23/07

ActionScript 3.0 Speed Tests

Exactly how fast is ActionScript 3? Depending on what you test, either slightly faster, 100x or 1,000 xtimes as fast as ActionScript 2. Here are three tests that I performed. All were done on my MacBook Pro.
The first test is for animation. One thousand 20×20 red circles are copied from the Library and places randomly on the stage. They all travel at a diagonal, one pixel per frame. They bounce off the walls. After 100 frames, a frames-per-second calculation is shown. Both movies are set to 120fps, but the Flash 8 movie only manages 6 fps after moving all 1,000 circles. The Flash 9 movie was getting 15 fps. The results weren’t quite as dramatic in the browser, as it was 10fps for Flash 8 and 12fps for Flash 9.


Flash 8 Animation Test: fpstest8.swf


Flash 9 Animation Test: fpstest9.swf


The second test was for string handling. I created a 100,000 character string from random capital letters. Then I loop through them and compare each character to the next one to find matches. Only the comparison loop was timed. The Flash 8 movie took 4,500 milliseconds to finish the task. The Flash 9 movie took 43. That’s more than 100 times the speed.


Flash 8 String Test: stringtest8.swf


Flash 9 String Text: stringtest9.swf


The final test was for math. I wanted to keep it simple, so I only used addition. I loop one million times, adding i+i. That’s it. Flash 8 did it in 6,800 milliseconds. Flash 9 took 102 milliseconds.


Flash 8 Math Test: mathtest8.swf


Flash 9 Math Text: mathtest9.swf


But wait, there’s more. To keep things fair, I used the “Number” variable type in the Flash 9 example. After all, Flash 8 only has “Number”. But when I used the “int” type in the Flash 9 example, the sepped of one million additions was 5 milliseconds!


Now these are pretty simple tests, but I think they show there is a lot of potential in the new ActionScript 3.0. The 2nd and 3rd examples are using exactly the same code syntax, which is what I was going for when writing them. The difference is that ActionScript 2.0 created by Flash 8 is executed by the older ActionScript engine in the Flash plugin. While ActionScript 3.0 code is executed by the new engine.

Try these tests out and post a comment with your results. Be sure to include the hardware and OS you are using. Love to see some Linux comparisons too.


9 Comments



04/21/07

Why ActionScript 3.0 Changes Everything

Move over Ajax, Ruby on Rails, PHP, JavaScript, Java and Python. There’s a new player in town and its name is ActionScript 3.0.


Don’t confuse ActionScript 3.0 with its namesake predecessors, ActionScript 1.0 and 2.0. This is a whole new language, and a whole new virtual machine. And its ability to build Web applications and games is like nothing ever seen before.


For those of you who don’t know, ActionScript 3.0 is the new programming language in Flash CS3 (AKA Flash 9). It has actually been around for a while, as the Flash 9 player was released eight months ago to support Flex 2. But now that Flash CS3 is out, ActionScript 3.0 applications can be built by more than just the small community of Flex developers.


So what makes it so great? Isn’t it just another browser-based embedded scripting language like old Flash, Shockwave and Java?


Well, for one, it is fast. Very fast. So fast that you can control complex animation or process large amounts of data. And you can do this on the client side, without having to rely on a server. So it becomes possible to write real local applications.


Next, it is fast. As in: fast to develop with. You can dream up, program, and test applications in a fraction of the time I thought it would be possible. I’ve already created some gems during my testing, and I’ve been blown away by how little time it took, and how few lines of code I end up with.


Powerful? Yes. Drawing vectors. Controlling text. Parsing XML. Handling data. Working with bitmaps. Working with sound. Working with video. Communicating with servers. Uploading files. Printing to printers. It does everything the browser will allow it to do, and some things that I’m surprised at.


I used to be bullish about Ajax. JavaScript seemed to be the way to go. But now with ActionScript 3.0, I can do so much more, so much more efficiently, and without bizarre restrictions of what works and what doesn’t. And cross-platform (Mac, Windows and Linux!) and cross-browser without a worry. Look for some amazing stuff coming soon.


Some more details: Since the Flash 9 player has been out since the release of Flex 2, there is already a 60-80% penetration of Flash 9. So even though Flash CS3 just came out last week, there is no need to wait for the users to catch up.


Word to ActionScript 1.0 or 2.0 developers. Don’t try to learn ActionScript 3.0 as an extension of the old ActionScript. Think of it as a new language. It is. You’ll learn it much faster if you go that route.


2 Comments



04/20/07

Adobe Support So Wrong: Downloads Don’t Work on Macs

So, it is Friday and I still haven’t gotten my shipment of CS3 disks. I bought CS3 on Monday and was unable to download the files. Kept getting an error courtesy of the “Adobe Download Manager”. See my previous post. The customer service rep assured me that it was an account problem, and not a cross-platform issue. He said trying on Windows would not be any different. But today I decided to launch Parallels and try downloading it from IE Windows anyway. Guess what: it is now downloading.


So the issue is with Adobe Download Manager and Macs. Shame on me for believing a  customer support person, I guess. Warning to all others. Shame on Adobe for having such a huge problem and not telling their support people how to deal with it. Shame on them for not offering an alternative download option.

I could have just saved $7 and bought this from Amazon.com. Then a good portion of the money would have gone to Amazon.com instead of Adobe. Right now I’m $499 poorer with nothing in return.


1 Comment



04/16/07

Adobe Releases CS3, Download Broken

So I was surprised to see CS3 available today. I thought it would be on the 20th. But anyway, I bought my upgrade right away. After all, I am writing a book on Flash 9, so I wanted to get on the actual software ASAP.


But, after shelling over my money, I find that the “Adobe Download Manager” isn’t working. And there doesn’t seem to be an alternative.


If I am on Safari, I click to download my purchased CS3 and all I get is a never-ending coffee cup “Java startup” screen. On Firefox, I seem to get into the download manager, but immediately get this message after I am prompted to save the file: “The requested file is not available for download. Contact the author of the page that contains the link. This download will be canceled.”


So far, my trouble ticket opened at 7 a.m. this morning has  gone unanswered. I hate when companies decide that standard downloading isn’t good enough for them or some such. Why does there have to be an “Adobe Download Manager” at all? Or, at least offer me the option of a standard download.


I’ll try phone support next.


1 Comment