25 Aug 2007

Moviestar - what happened to SWFAddress?

The latest Flash Player Beta release is great: H.264 support, hardware acceleration, immediate Linux availability. I thought that currently I don't have the time to test the new features, but a little bit later I was warned that SWFAddress does not work with this update. While this is something which can be expected from a Beta version I felt obliged to investigate what is the reason behind this failure.

The release notes of the Moviestar update say that the ExternalInterface has been improved and this sounded like a potential reason for my SWFAddress troubles. Yesterday I found some time for experimenting which led me to the following:

So it appeared that there is only a problem with AVM1 and ExternalInterface. After some more testing I came to the conclusion that:

Basically simple function work, but object methods no longer can be called. I suspect that this is not a desired behavior and I've created a test case which is available for download. The bug is now also submitted to Adobe and you should do the same if you find any other issues with your existing content.

Update: Everything is back to normal with the Flash Player 9.0.64 release. Thanks to everybody involved in this quick fix!

18 May 2007

SWFAddress bad practices

As the number of SWFAddress powered sites grows I often see problems caused by poor implementations or lack of information. Here is a list of the top 5 practices which should be avoided:

Usage of getURL() for user tracking, statistics and popups
While this is a standard Flash functionality used for years, the combination with ExternalInterface introduces a critical bug with Internet Explorer. The resolution is to use ExternalInterface for every JavaScript call. SWFAddress 2.0 will help you with some predefined methods for popups and blank window links.
Homepage address values like '#Home' or '#/root'
Such address values are not needed and should be replaced by SWFAddress.setValue('/'). The usage of creates an unneeded history entry when is opened.
Address values naming using camelCase or other forms of custom convention
SWFAddress samples clearly define the best naming convention for deep links. Web addresses are case insensitive and the standard is lower case. For readability and Google SEO compatibility reasons the convention 'my-deep-link' is more appropriate than 'myDeepLink' or 'My_deep_link'. The format is the only one fully compatible with the SWFAddress SEO rewriting.
Including SWFAddress before the TITLE tag
SWFAddress contains a fix for Internet Explorer and URLs which contain anchors. In order to benefit from it the title tag should be printed before the swfaddress.js include.
Duplication of navigation logic

Integration of SWFAddress into a legacy code may require the following implementation:

For brand new projects, the best way to organize your code looks like this:

Update: The post has been updated for SWFAddress 2.0.

17 Oct 2006

SyntaxHighlighter by DreamProjections

Since we've started this website I'm looking for a syntax highlighting tool that can be used for code samples. Geshi seems to be great, but since I'm using Tomcat I cannot run PHP scripts that easily. The same applies to the well-known Beautifier highlighter and it hasn't been updated for long time. Flash Text Formatter is a good one, but to me it seems more appropriate for full Flash websites. So one day while I was browsing at the YUI examples I saw another engine that uses pure JavaScript to highlight most of the languages that I need. This is how I've chosen the dp.SyntaxHighlighter and below you can see some samples of it:




This showcase uses a custom copy of dp.SyntaxHighlighter that matches the look and feel of our website. It also includes improved CSS highlighting, ActionScript support and a minor Ruby related fix. I'm providing my version for download and I hope that one day I'll find some time to convert it to a blojsom plugin.



Blog Search

Blog Categories

Blog posts

Recommended sites