Hybrid Disc Problems with Toast and Director

We’ve been using Toast to burn Hybrid CDs since 1994. When I first purchased the new version I was a bit upset that they took out the ability to burn old-style hybrid CDs. However, they didn’t remove the functionality, they just turned it off. Go into the preferences and enable “Show legacy formats and settings” and it will behave just like it did before. Well, almost. Now it has some really annoying animation, but otherwise it works the same. One other difference was a bit harder to track down and fix.

All of our software current software titles were made with Macromedia Director and with the introduction of OSX Lion they no longer work. The transition to Adobe Director 11.5 has been relatively painless except for some old Flash code in Actionscript 1.0 that hasn’t updated nicely to ActionScript 2.0.

However, when we gave the discs to some people in the office to test they got two errors. When they tried to run program from the disc, an application alert came up telling them “This application requires Adobe Shockwave 11, which can not be found. Click to download it.” If they try to copy it to the hard drive, they get a different error. “The alias “Gamename” cannot be copied to the destination, perhaps because the destination does not support this type of alias.” Our development machines don’t give any errors—even the alias one.

It turns out that the problem is in the way Toast handles (or rather doesn’t handle) aliases in the app bundle.

The app bundle looks like this

Hybrid CD Error

If you follow the aliases you’ll find that
DPLib ==> /Contents/Frameworks/DPLib.framework/Versions/A/DPLib
Resources ==> /Contents/Frameworks/DPLib.framework/Versions/A/Resources

Replace the aliases with the source files, and do the same thing in IMLLib.framework and ProjLib.framework. As near as we can tell the Current alias isn’t necessary and can be deleted from all three locations.

Once you have all your aliases replaces and successfully burned a test CD, make a copy of the Frameworks folder. You can replace the Frameworks folder in new apps with the one that you have working.

The solution was tested on OSX 10.3.9, 10.4.11, 10.5.8, and 10.6.8. We haven’t had access to a Lion machine yet.

Color Depth

We started out making games with Director 4 back when Windows only supported 8 bit palettes and monitors were 640×480. We chose a background color from the Mac Palette that is hex #0066FF. About 5 years ago we updated our movies so that they would fill the whole screen on larger monitors. Most of the backgrounds and menus Flash .swf files. They scale nicely at all resolutions. We had a bunch of backgrounds masks that are solid colors so we just transformed them to 16 bit bitmaps.

We’re updating a bunch of Director movies to D11.5 so that they will run on OSX Lion and our graphic designer noticed that the backgrounds weren’t exactly the right color. It turns out that Director, for its usual inscrutable reasons, didn’t map the Mac Palette color to #0066FF and they ended up being #0063FF instead. Transforming them back to 8 bit and then to 32 bit fixed the problem.

Apple Store App is Now Available

FAA Glossaries is now available on the App Store.

This app is a collection of Glossaries found in FAA publications for pilots. It includes words, terms, and acronyms from seven FAA books: Handbook of Aeronautical Knowledge, Airplane Flying Handbook, Instrument Flying Handbook, Instrument Procedures Handbook, Aircraft Weight and Balance Handbook, Aviation Instructor’s Handbook, and Aviation Weather. It also includes the acronyms from the AIM, the complete Pilot/Controller Glossary, ATC Glossary, and definitions from the FARs—TITLE 14–Aeronautics and Space.

Get FAA Glossaries from the Apple App store!

FAA_Glossaries-First_Day

Random Text Cleanup

I’ve been doing a lot of text manipulation lately. Here are some tricks that I don’t want to forget.

I’m working on an FAA Glossaries iPod app. I got the words from FAA publications. They are in a MySQL database that I export to SQLite for use in the app. Here are some tricks I’ve been using to clean up the data before and after import to the database.

grep for line numbers

After exporting from the database I have a file that starts with a parenthesis a number, a comma, and a space.
The following grep code will remove the parenthesis, one or more numbers, the comma, and the space (indicated by a b).

(260,b

^\([0-9]+,b

Finding duplicate occurrences of a set of characters in a line.

The original PDFs and web pages are fairly consistent so it’s not too difficult to automate the process of converting a glossary to a format that I can import into the database. Eventually I want it to look like this:

(2983, ‘advection’, ‘The horizontal transport of air or atmospheric properties. In meteorology, sometimes referred to as the horizontal component of convection.’, 7, 4),
(2984, ‘advection fog’, ‘Fog resulting from the transport of warm, humid air over a cold surface.’, 7, 4),
(2985, ‘air density’, ‘The mass density of the air in terms of weight per unit volume.’, 7, 4),

Often the data has the form:

advection- The horizontal transport of air or atmospheric properties. In meteorology, sometimes referred to as the horizontal component of convection.
advection fog- Fog resulting from the transport of warm, humid air over a cold surface.
air density- The mass density of the air in terms of weight per unit volume.

So replacing the hyphen and space with ‘, ‘ separates the term from the definition for the database. BBBEdit and TextWrangler let you find lines containing any set of characters so you can easily find all of the lines that didn’t get converted. Maybe there was a space after the hyphen. Or maybe the hyphen didn’t get copied.

Sometimes words get hyphenated and the raw text looks like this:

altimeter setting- The value to which the scale of a pres- sure altimeter is set so as to read true altitude at field elevation.

When you do your substitution you end up with two sets of delimiters. They don’t easily let you search for lines that have one or more occurrences of a set of characters. However, there is an easy workaround. Do a find all for ‘, ‘. A new text window will appear that lists all of the occurrences of the search term. Copy that list to a new document. Process duplicate lines to a new document. The new document has all of the lines that contain more then one occurrence or your search term. Look them up and fix them manually.

Capitalization

I usually want the first word of the definition to be a capital letter. Turn Case Sensitive on and search for

, ‘[a-z]

replace it with

\U&

What grep does is look for all definitions that start with a thru z and because the a-z is in brackets you can replace what is found. The \U& says to take what you found in the brackets and upper case it.