Sunday, June 24, 2007

Captivate Preloader

I've been working with Captivate 2.0 lately and I must say its best feature over 1.0 is stability. 1.0 crashed frequently and 2.0 seems quite stable. I wish more software companies would realize that stability is the #1 feature.

While working with a simple movie, essentially two slides. I was encountering some odd behavior occurred intermittently. The movie had an image and clickbox on the first slide. The clickbox would initiate the change to the second slide. The second slide had a picture and a large audio file. For some users, clicking the box would result in the SWF going momentarily blank before showing the second slide and then playing the sound. Sometimes it would not play the sound.

I tried a variety of techniques to improve the playback, to no avail. While investigating the problem, I noticed that it seemed like it was caused by the SWF not entirely loading and the user clicking before it did. I noticed that it seemed like the preloader was consistently loading 60% of the movie before displaying the first slide. I must have looked at every preference in Captivate three times. For the project, for the slides, and any place else I could find. Nowhere could I find a setting. Finally, I exported the Captivate to Flash 8 and started looking through the code. I couldn't find a setting there which determined the amount loaded. Finally, I found the .FLA of the DefaultPreloader.swf that Captivate used. In there was the problem. The number 60 was hardcoded into the code! Hard to believe but true. How many computer science teachers and books talk about avoiding such things yet here it was in a commercial project and cost me hours of time tracking down.

My #2 feature for software companies to implement... documentation.