Director Web : Tips n' Scripts : Platform Specific Issues

Mac to Windows (and back?)

Date:    Sat, 24 Sep 1994 15:17:52 -0800
From:    Frank Leahy <fjl@NETCOM.COM>
Subject: Windows Conversion Issues
I'm in the final throws of a cross platform CD-ROM, and have recently been working on the Windows port, and thought I'd share my experience, as well as a couple of problems that I'm hoping someone else might be aware of.

1. It works!

The title I'm finishing is a kids nutrition title, with lots of animation, graphics, dragging and dropping, games, sounds, quicktime movies all over the place, and lots of fun and learning -- about 30 Director movies in all. Amazingly enough, I was able to get it all converted and working in one 12 hour session.

Here's what I had to change:

A. File Names.
The documentation suggests that Director is smart enough to convert file names with Mac ":" to DOS "\". It isn't. I defined a global gSep (short for gSeparator) based on the machineType. Now I always build path names using this global.

B. One set of movies.
I thought I'd be able to use one set of movies between the Mac and Windows, I can't. When I first opened a movie on Windows it asked me for about 10 cast members it couldn't find, i.e. ones in the shared cast. I made a projector, and while running it would ask me for cast members from each of the movies I went to. So I opened each movie in Director for Windows, and Saved/Compacted. Then when I ran the Projector which now goes to the Windows versions of the movies, voila, no more errors.

C. Volume name.
Being a Mac bigot for the past 8 years while working at Apple, I'd forgotten how brain dead the DOS file system is. For the Mac version I can just hard code the CD-ROM volume name into my pathname globals, e.g. set gMovieFolder = "BODYFUN:MOVIES". On Windows/DOS there is no such concept as a volume name, you need the drive number, e.g. set gMovieFolder = "C:\MOVIES\". I wanted to allow the user to copy the project to their hard drive, but I found it impossible to determine the drive number. I tried the suggestion on this list of using fileio() to open a known file on drives 'A' - 'Z', but each drive with no media, e.g no floppy in 'A', brings up a stupid dialog box asking "Can't access this drive" with "Cancel" and "Retry" -- definitely not user friendly.

My solution was to run the projector from the CD-ROM. It runs fine with seeminly little if any slowdown. The drive name issue is also solved since I can now call:

  set gMovieFolder = char 1 to 2 of the pathname & "\MOVIES\"
Of course to be sure I am running off the CD-ROM I should call fileio() looking for that known file.

D. Text.
The biggest problem I've had is with text display -- and if I had to guess I would put the blame squarely on a testing screwup at Macromind -- this one is so obvious that it's almost painful. On the Mac all my text fields are in Helvetica, from 10 to 48 point. Most of the text fields are one line displays, to display a name or age or food description. When you run the Windows version, all the text is drawn about 10 pixels lower in the field. That's right, the text field is in the right place but the characters are drawn lower in the field, i.e. the baseline of the first line is 10 pixels lower for the Windows font Arial than for the Mac font.

====> Question: Has anyone else seen this, and if so is there a work around? Is there something I can put in the FontMap.txt file to modify this? At this point, my solution will be to resize and move up all the text fields in the Windows version of the movies, just before we ship.

E. QT movies.
Several of my QT movies would not play their sound track in the Windows version. The video was fine, but the sound didn't work. After much playing around, I noticed that the problem had to do with which sprite channel it was in.

Here's the scenario:
Loop on frame one waiting for the user to click a button. In sprite channel 4 a QT movie is playing, it is a little looping animation (which happens to have no sound). Kid clicks a button to go to frame 10 which has a different QT movie, also in channel 4 -- and its sound doesn't play.

After a little investigation, I found that if I click in frame 10 of the SCORE to move the frame head, instead of clicking the button, the sound plays fine. Very weird.

So, I moved the QT movie with sound from sprite channel 4 to channel 5. Now, clicking the button to jump to frame 10 causes the QT movie to play the sound!

My guess is that the sound channel doesn't get cleared properly when switching QT movies in the same sprite channel.

====> Question: Has anyone else seen this, and if so is there a work around? At this point, my solution will be to be sure I don't put two QT movies in the same sprite channel.

F. Drag and drop
Some of my drag and drop routines work fine, some don't. The documentation mentions something about using stageleft and stagetop, but I haven't checked it out yet, and when I do I'll report back.


Date:    Sun, 29 Jan 1995 21:28:40 -0800
From:    Frank Leahy <fjl@NETCOM.COM>
Subject: Re: Sharing linked files from Mac to Windows
I handle cross platform files as follows:
  1. I develop on the Mac, and keep a master copy of all files and movies on a hard disk that is 640MB in size (about the size of a CD).
  2. All media is stored in various sub-folders within a single folder named "MEDIA", the mac movies are in a folder called "Mac Movie Folder" and all windows versions of those movies are in a folder called "MOVIES". All three of these folders are at the top level of the disk.
  3. We have a network volume, on a Novell server, which has the same name as my hard disk when it is mounted on my mac (which appears as a drive letter when it is mounted on a PC).
  4. I develop on the Mac, then copy all new files to the network volume. When I do this, I also copy all of the mac movies from the "Mac Movie Folder" into the "MOVIES" folder.
  5. I mount the network volume on a PC, and open each of the movies in the "MOVIES" folder in DfW and do a "Recompile All Text" and "Save and Compact".

    MOST IMPORTANTLY I always started with my shared movie "SHARED.DIR" and then do the other movies one at a time. I have found that this cuts down on the number of times I am asked to find a particular piece of media. In fact I have gotten so that it doesn't ask me at all any more.

    While this separation of Mac and Windows versions of movies shouldn't be absolutely necessary, everything seems to work better when I do it.

  6. Now I can mount this network volume on a Mac and test the Mac version, or mount it on a PC and test the PC version.