Monthly Archives: March 2006

Eolas Patent Says Bye-bye to Flash Advertising

In this article by eWeek, Mark Swords, a representative of Eolas whines about Microsoft changing the behavior of IE. Part of his message stuck out in my mind:

the IE modifications spelled out by Microsoft… will reportedly disrupt the way online advertising and streaming media content is delivered over the Internet. [It] is an inconvenience users could do without.

Advertising? I don’t know about everyone else, but I’d love it if Flash ads went the way of the dodo. They’re usually annoying or ugly. Mostly both. Yet, Flash-based ads still account for a good deal of the advertising I see on the larger sites. Since the purpose of an ad is to get the click, you certainly don’t want to give your potential customer a hassle by making them click twice. What does this mean? I think there’s a good chance we’ll be seeing fewer Flash ads soon.

I’m not saying they’ll completely disappear. Obviously, there are fixes available for the Eolas issue. However, everything I’ve seen requires JavaScript. Not everybody likes JavaScript. Some people completely turn it off. Personally, I believe that’s a very small population, but I know that many websites are reluctant to use it thanks to these vocal people.

It all seems kind of murky. Advertisers that provide content in iframes might be least affected since they handle all their code and includes. Yet, even then, their clients may demand zero JavaScript. Will we see more Adsense or other types of text ads? How about simply an increase in animated GIFs? I’m curious to see if there will be a noticeable change.

MxnaMap 1.1

Note: This project was written for an early, pre-release version of Flash 9. Have a look at my MXNA Dashboard, which has been updated to work with the proper final version of the player.

I had a lot of fun building a treemap of the MXNA last week. With the framework laid, I spent some time sprucing things up. Some Flex buttons give the map a little depth, and with a few color changes here and there, they easily match the MXNA color scheme. I’ve also expanded the map to show two different views. You’ll be able to tab between the most popular posts and the most recent. My next job will be to add category views.

Screenshot of the MXNA treemap application

With the exciting Flex Developer Derby on the horizon, I decided to try out some dashboard-like functionality. On the left side, I added a full listing of all the stories in the map. Above that, I’ve put together some interesting statistics on the displayed data. Ignoring various common words like “the” or “is”, you can view the top five keywords that appear in the titles of the current articles. I’d like to think it will give a good idea of what’s hot on the MXNA on those days where everybody’s posting about something exciting. I may add post excerpts at some point to make it even more accurate. The analysis also captures the most active posts. I hope to find more statistics to extract from the data.

FlashDevelop HelpPanel 1.3

Here’s a quick release with some requested features and slight adjustments. I’ve added a setting to save the last used source so that it can be restored the next time you start FlashDevelop. If you have Flash 8, the AS Language Reference and Component Reference have been combined into one source. The source manager dialog received a nice makeover too. It looks a lot like the global classpaths dialog now.

If you’ve been watching my official thread on the FlashDevelop forums, you’ll know that I’m putting a lot of work into indexed searching. This will make all searches incredibly fast (less than one second). While I’m making good progress, I still haven’t completed that feature. I just felt that I had made enough changes to other functionality to warrant a new minor release.

You can get the plugin and its source code from the downloads section.

Visually Mapping the MXNA

Note: This project was written for an early, pre-release version of Flash 9. Have a look at my MXNA Dashboard, which has been updated to work with the proper final version of the player.

I’ve been studying data visualization recently. During my research, I came across Newsmap. It uses a treemap structure to visually compare the importance of current news items on Google News. This weekend, I built a similar application based on data from the MXNA. Please note that you need Flash Player 8.5 beta to view the demo. If you aren’t a Flash developer, you probably don’t have it. Certainly, this could be done with an earlier version of Flash, but I wanted some practice with AS3.

Screenshot of the MXNA treemap

The MXNA provides web services and Flash services for developers to make use of the posts it aggregates. I’ve never used FlashVars before, so I decided to use those instead of the XML web service. Luckily, AS3 provides the useful URLVariables class, which automatically parses FlashVars into a simple object.

Nodes on the map display the post title, and the user just needs to click on them to navigate to the post. The size of the node’s rectangle is based on the popularity rank provided by the MXNA. Brighter rectangles indicate newer posts. You’ll instantly notice that newer posts tend to have a lower rank because they haven’t had as much exposure. New posts with larger nodes can indicate popular subjects or well-written headlines.

Currently, the map only shows the newest 25 posts, but the webservice will provide up to 50. Alternatively, the map could show only the most popular posts for the whole day. I could also get posts by category only, such as Flash or ColdFusion. Even better, the map could be expanded to hold a series of sub-maps that show the relative popularity of each of the categories. Arguably, the best solution might be to create a series of tabs to allow a user to choose which option he or she prefers.

Flash Unit Testing

Darron posted a great article today about unit testing with AS3 and Flex 2. He explains a full workflow for FlexUnit. You might also be interested in ASUnit, a unit testing framework for Actionscript 2.0. I want to start using unit tests myself, but I haven’t taken the time to commit to it. Darron’s post is a great introduction that gets me a step closer.

You Can Catch Timeouts and Stack Overflows in Actionscript 3

While exploring the AS3 Language Reference today, I discovered a couple of potentially useful classes in the flash.errors package, ScriptTimeoutError and StackOverflowError. The package itself contains special classes specifically designed for the Flash Player.

By putting a try-catch block around a potentially long operation, you can catch a ScriptTimeoutError to stop Flash from the usual crash and burn. Now your application can fail gracefully if you need to run some heavy duty calculations. At first, I expected this to be more useful. I could see a Flash movie that would catch the timeout error, update the screen with it’s progress, then continue on with the calculations. Unfortunately, it looks like you’ll only have one opportunity to catch the error. According to the ASLR, the second time your script times out, you’re out of luck.

The StackOverflowError class can be used to catch problems with deep recursion. Like the timeout error, you’ll be able to fail gracefully without the potentially-confusing Flash Player message appearing. Even better, I believe that a clever programmer could use this one to run especially long recursive problems. Unlike the previous error, you don’t get one opportunity. Imagine saving the state of your calculations every time you make a recursive call. When you get a StackOverflowError, you can start over with the saved value and run your operation with a clean stack. As long as you keep saving the state, you may continue until the operation is done. Of course, you’ll have to be extra careful because you may end up receiving the pesky timeout error I described above. It seems to me, however, that you could let your Flash movie rest for a moment after each stack error to refresh itself. You can update a progress bar or something to visually indicate that progress has been made so the user isn’t left wondering if something bad happened.

Obviously, you won’t be using this technique often. Even with the new faster VM, Flash isn’t exactly the best choice for heavy calculation. Internet culture being what it is, you’ll need to consider that the user could get impatient if they have to wait too long. It’s all about balance. Just think of this as another tool that you may never use, but if you ever need it, it’s there, free of charge.

Important Note: I tried running some operations that should give timeout messages and stack overflow errors. For some reason, the movie completely stopped responding, and I needed to force-quit the browser via Windows Task Manager. Even when I tried catching the errors, nothing happened. I’m guessing this hasn’t been fully implemented, or this might be a particular behavior that only appears in a debug player like the one we’re working with now. File this technique away for future use.