|
[Previous entry: "Problem Turkeys"] [Cliffs - Home] [Next entry: "Pilgrim's Progress"]
11/25/2003: "Spooky Bug"
A "bug" is something that keeps your magnum opus (program, script, web page) from working the way you expected it to work. Some bugs are spookier and more difficult to find than others. The spookiest ones invariably crop up just before the arrival of a deadline. In fact, I think this is some kind of law. Maybe one of the "Murphy's" laws. Click more.. below.
Anyway, this one was a stone bitch to find. It was the worst kind since it wasn't really a bug at all, but bad input wearing a pretty made up face. I had just cloned a flash sub movie out of a demo site of mine to use in a project which is due to be complete tomorrow. You see, the timing is perfect. Well, I changed it around to fit its new job and tested it. I had made quite a few changes to the script that drove it, but low and behold, it worked. Not completely, mind you, but almost. This is another bad sign. When you clone something to save time, it never works. I think this is another of those Murphy's laws.
What this puppy was supposed to do was to dynamically load a project description and a corresponding picture when the flash movie loaded. Then, it allowed the user to spin forward or backward through additional description/picture sets until he got tired of it. So right out of the box, my cloned and modified sub movie popped up with a picture and description. And they were the right ones. Cool. So I click the forward button and up pops the next description but no picture. Click, click, click, click always a description and no picture, then wham, a description and a picture. It's the same picture, but this time loaded from inside a function that ran because of the click next, where before it loaded when the movie loaded.
OK, that's pretty close. I've got a set of 4 picture/descriptions for testing; the initialize works, but the spin forward and backward has a few problems. I try different sets of picture/descriptions; this time, I get nothing but a description on the initialize, but this time the spin forward and backward gives me better but still inconsistent results. I stepped through the code and debug mode and everything looked good, but that's not unusual. Macromedia has warnings in its documentation about dynamically loading .JPG files in test mode unless the pictures (.JPGs) are in the same folder as the sub movie. So, I reorganized everything to work around this idiotic limitation, and doing so unfortunately involved moving and renaming some of my test project pictures, further masking the real problem which was, as I said earlier, bad input data.
My problem, sports fans, which I discovered after a half day of screwing around is that flash will load any .JPG compressed picture into movie clip, but if the picture was compressed with "progressive" checked on Photoshop's save for Web panel, it just won't display anything. My pictures, of course, were mixed, with some compressed with progressive checked and some not. I'm sure I would have discovered my problem less painfully if I hadn't been worried about the file structure I was loading from and how I should have kept it simple for testing. But the reality is if I hadn't been looking at a deadline it would not have happened at all. Call it "Cliff's law."
Note to readers:
Readers with Internet Explorer can use these links to "Add to Favorites." The rest of you are on your own. Remember, Cliffs Notes dot Info.
Click here to add this page to your favorites!
Click here to add this site to your favorites!
If you've enjoyed Cliff's Notes, click here to find lots more blogs. This link opens in a new window in case you realize you were better off here.
Last but not least, if anything interesting comes to mind about the above post that you would like to share, blurt it out in the form below. If you enter a "homepage," your "name," as you entered it, will become a link to your site. E-mail addresses, if entered, may be harvested by spammers.
|