14 Replies Latest reply on Feb 21, 2007 5:39 PM by johnAq

    PC to Mac movie

    HERMAPHRODITES

      This is a simple question but the answer does'nt come to mind: I created a Director movie using Lingo script on a PC. Fopr some reason, when on a Mac (OSX), the Director movie can't read the scripts created on the PC. Why is this?
        • 1. Re: PC to Mac movie
          Level 7
          Are you talking about a projector? Or are you opening a .dir file on a
          Mac that was originally created on Windows?

          What do you mean by "can't read the scripts"?

          --
          Rob
          _______
          Rob Dillon
          Adobe Community Expert
          http://www.ddg-designs.com
          412-243-9119

          http://www.macromedia.com/software/trial/
          • 2. Re: PC to Mac movie
            HERMAPHRODITES Level 1
            Well, my project contains a .dir file made up of LINGO scripts, handlers...then there is a image folder that contains the images related to the project and finally, there are text files containing a list of the files and some parameters such as dissolve times, position on screen, size, etc. You guessed right: it's a slide projector! Anyway, the .dir file reads the text file that instrucks it to choose an image and show it as instructed within. This has been created on a PC and works fine. But, I can't get it to run on the Mac. I don't know what I am doing wrong.

            P.S. Sorry for the stupid nickname, but I have issues with ADOBE and their nickname scheme!
            • 3. Re: PC to Mac movie
              HERMAPHRODITES Level 1
              The ultimate goal is to have a PC and a Mac projector compiled.
              • 4. Re: PC to Mac movie
                Level 7
                In a more specific way, what, exactly, is not working when you run it
                from a Mac? You have said that it "can't read the scripts", then you
                "can't get it to run". What is the problem, specifically? Do you get
                an error message? Does the program start then lockup? What part of the
                program is having a problem?
                • 5. Re: PC to Mac movie
                  Level 7
                  "HERMAPHRODITES" <webforumsuser@macromedia.com> posted in
                  macromedia.director.basics:

                  > Anyway, the .dir file reads the text file that
                  > instrucks it to choose an image and show it as instructed within. This
                  > has been created on a PC and works fine. But, I can't get it to run on
                  > the Mac. I don't know what I am doing wrong.

                  Imagine that we haven't seen any of your code. Now assume that we don't know
                  what you mean by "can't get it to run on the Mac." (Projector doesn't start?
                  Script doesn't read the text file? It reads the file, but doesn't "choose an
                  image?" - "show it as instructed within?" Displays images, but dissolves
                  times are inaccurate? etc...) Please remember that there is no built-in
                  "choose an image" or "show it as instructed within" feature of Director that
                  we can refer to out here.

                  Now imagine how hard it is to help somebody when there is so little
                  information about what is working and what is not working as expected.

                  Here's a thought anyway.

                  Which Xtra do you use to read the text file? Have you supplied the Mac
                  version of that Xtra (and other Xtras if required) according to the
                  procedures listed in the Help file?


                  HTH

                  --
                  Mark A. Boyd
                  Keep-On-Learnin' :)
                  • 6. Re: PC to Mac movie
                    pideja Level 1
                    The DIR file contains all commands. The text file contains a list of image files that are "read" by the DIR file. The image folder contains the images. Here is the "on readFromFile" script that I use. THe text file looks like this:
                    02.tif,10,+580,-20,135,52
                    02.tif,30,+580,-20,135,
                    02.tif,30,+580,-20,135,
                    noir.tif,05,,,,
                    04.tif,10,-580,-20,135,
                    04.tif,60,-580,-20,135,
                    noir.tif,05,,,,
                    03.tif,10,,-45,135,
                    03.tif,60,,-45,135,
                    11.tif,10,,,,
                    11.tif,60,,,,
                    where the first collum is the image file name, then the dissolve time, then the lateral position on screen, the the vertical position, then the size...

                    I'm not aware of any extras that would be missing in my Mac version of Director MX
                    • 7. Re: PC to Mac movie
                      pideja Level 1
                      I just noticed the FILE IO XTRA at the top of the script. In my Mac version, the xtra is FILE IO PPC XTRA. Is this the correct xtra?
                      • 8. Re: PC to Mac movie
                        Level 7
                        "pideja" <webforumsuser@macromedia.com> posted in
                        macromedia.director.basics:

                        > The DIR file contains all commands. The text file contains a list of
                        > image files that are "read" by the DIR file. The image folder contains
                        > the images. Here is the "on readFromFile" script that I use. THe text
                        > file looks like this:
                        > 02.tif,10,+580,-20,135,52
                        > 02.tif,30,+580,-20,135,
                        > 02.tif,30,+580,-20,135,
                        > noir.tif,05,,,,
                        > 04.tif,10,-580,-20,135,
                        > 04.tif,60,-580,-20,135,
                        > noir.tif,05,,,,
                        > 03.tif,10,,-45,135,
                        > 03.tif,60,,-45,135,
                        > 11.tif,10,,,,
                        > 11.tif,60,,,,
                        > where the first collum is the image file name, then the dissolve time,
                        > then
                        > the lateral position on screen, the the vertical position, then the
                        > size...
                        >
                        > I'm not aware of any extras that would be missing in my Mac version of
                        > Director MX

                        Ah, but have you included the Xtras IAW the docs? That is, either in an
                        external Xtras folder next to the projector - or in the projector itself?

                        > set myFile = new(xtra "fileio") -- Creates an instance of FileIO

                        At the very least, you'll need the FileIO Xtra

                        Also, I think there's a TIFF Import Export Xtra.

                        Might need the Text and Font Xtras since you're setting the text of a member
                        later in the code.

                        > if the machinetype = 256 then

                        You /may/ want to update that line to the more recent (the
                        environment).platform though I think machineType still works.

                        Thanks for posting your code. I only glanced at it, but didn't catch anything
                        obvious.

                        Now if we can just get to knowing where it's breaking. Is anything working at
                        all? Does the projector start? Any error codes?

                        > openFile(myFile, filename, 1) -- Opens file that user selected

                        Does this line execute if it needs to (SHOWNAME and filename are void)? Do
                        you see the file open dialog box?

                        > alert error(myfile,status(myfile)) -- Displays error message

                        Does your fileIO error checking throw up an alert?

                        What, exactly, is not working?


                        --
                        Mark A. Boyd
                        Keep-On-Learnin' :)
                        • 9. Re: PC to Mac movie
                          Level 7
                          "pideja" <webforumsuser@macromedia.com> posted in
                          macromedia.director.basics:

                          > I just noticed the FILE IO XTRA at the top of the script. In my Mac
                          > version, the xtra is FILE IO PPC XTRA. Is this the correct xtra?

                          Most likely. I just fired off another message that mentions a couple of other
                          Mac Xtras you may need.


                          --
                          Mark A. Boyd
                          Keep-On-Learnin' :)
                          • 10. Re: PC to Mac movie
                            pideja Level 1
                            >>Now if we can just get to knowing where it's breaking. Is anything working at
                            all? That would be great...
                            >>Does the projector start? Yes, the projector starts, but does not display the correct images. Stays "stuck" on one or two images.
                            >>Any error codes? No error messages appear.

                            > openFile(myFile, filename, 1) -- Opens file that user selected

                            >>Does this line execute if it needs to (SHOWNAME and filename are void)? Yes
                            >>Do you see the file open dialog box? I don't usually see the box when it's running. I don't see it even in the deffective Mac version.

                            > alert error(myfile,status(myfile)) -- Displays error message

                            >>Does your fileIO error checking throw up an alert? No alert messages.

                            What, exactly, is not working? When the projector starts (it does start), I see the initial screen that provides a choice of show to see. Upon selecting a show, spacebar should initiate the slide-show (images). What images are shown is listed in the text file. This does not happen. That is to say that the "action" (dissolve time. position, size) do occur, but there is no choice of images. Could the problem reside in the actual text file?
                            • 11. Re: PC to Mac movie
                              Level 7
                              pideja wrote:
                              > The DIR file contains all commands. The text file contains a list of
                              > image files that are "read" by the DIR file. The image folder
                              > contains the images. Here is the "on readFromFile" script that I use.
                              > if the machinetype = 256 then
                              > setfiltermask (myfile, "All files,*.*,Text files,*.txt") -- Sets
                              > the filter mask (Win)
                              > else
                              > setfiltermask (myfile, "TEXT") -- Set the filter mask (Mac)

                              Is the file actually a TEXT file according to the Mac? You might need to
                              open it in a Mac text editor and save it again.

                              It would be simpler to call the file the same thing on both platforms and
                              forget about all the setfiltermask stuff; just be aware that Macs use LF as
                              the line delimiter whereas PCs use CRLF.

                              > repeat with loopvar= 1 to 255
                              > startticks=startticks+hopsize
                              > if startticks<the milliseconds then next repeat
                              > sprite(nextsp).blendlevel =loopvar
                              > sprite(Lastsp).blendlevel =abs(255-loopvar)
                              > repeat while the milliseconds<startticks
                              > sprite(nextsp).blendlevel =loopvar
                              > sprite(Lastsp).blendlevel =abs(255-loopvar)
                              > updatestage
                              > end repeat
                              > updatestage
                              > end repeat

                              You really do not want to use updatestage. Doing as you have done above
                              locks out the computer from doing anything else.

                              http://groups.google.com/groups?as_q=updatestage+bad&num=10&scoring=r&hl=en&as_epq=&as_oq= &as_eq=&as_ugroup=macromedia.director.*&as_usubject=&as_uauthors=Andrew+Morton&lr=&as_drrb =q&as_qdr=&as_mind=1&as_minm=1&as_miny=1981&as_maxd=21&as_maxm=2&as_maxy=2007&safe=off

                              Shorter link:
                              http://tinyurl.com/33wqv9

                              Andrew


                              • 12. Re: PC to Mac movie
                                pideja Level 1
                                The updatstage is used precisely because I do not want the computer to do anything else but show the movie. I use this "projector" during live stage shows and I would not want anything else to happen on screen.
                                I tried again this morning to run the show on a Mac and the situation is this:the program starts up and when in play mode, the initial screen shows up correctly. This is a screen in wich buttons appears enabling one to choose wich show to see. But then, after choosing whatever show, the effects (dissolves, screen position...) are all correct but the image is wrong and always the same. It is as if the program can't read the first part of the text file, the image file name. Also, on my Mac, the file extention always is shown. Does this impair the ability for Mac Director to read the files? I'd love to send you a "sample" show, if you would like.
                                • 13. Re: PC to Mac movie
                                  Level 7
                                  pideja wrote:
                                  > The updatstage is used precisely because I do not want the computer
                                  > to do anything else but show the movie. I use this "projector" during
                                  > live stage shows and I would not want anything else to happen on
                                  > screen.
                                  > I tried again this morning to run the show on a Mac and the situation
                                  > is this:the program starts up and when in play mode, the initial
                                  > screen shows up correctly. This is a screen in wich buttons appears
                                  > enabling one to choose wich show to see. But then, after choosing
                                  > whatever show, the effects (dissolves, screen position...) are all
                                  > correct but the image is wrong and always the same. It is as if the
                                  > program can't read the first part of the text file, the image file
                                  > name. Also, on my Mac, the file extention always is shown. Does this
                                  > impair the ability for Mac Director to read the files? I'd love to
                                  > send you a "sample" show, if you would like.

                                  I'm asssuming from the context that you're replying to me (I can't tell
                                  because the forum->newsgroup translator is buggy).

                                  It sounds like the problem may be the line-end difference between Macs and
                                  PCs - have you tried with a text file created on a Mac or, perhaps better,
                                  account for the problem in the program?

                                  > if not voidP(filename) and not (filename = EMPTY) then
                                  > openFile(myFile, filename, 1) -- Opens file that user selected
                                  > if status(myFile) = 0 then
                                  > set theFile = readFile(myFile) -- Reads the file into a Lingo
                                  > variable

                                  n=length(theFile)
                                  modifiedString=""
                                  repeat with i=1 to n
                                  c=char i of theFile
                                  if CharToNum(c)<>13 then
                                  put c after modifiedString
                                  end if
                                  end repeat
                                  put modifiedString into field "myField" -- Displays the text in a field

                                  > else
                                  > alert error(myfile,status(myfile)) -- Displays error message
                                  > end if
                                  > end if
                                  > closeFile(myFile) -- Closes the file
                                  > set myFile = 0 -- Disposes of the instance

                                  Director on a PC is happy with Mac-style line-ends, but not vice-versa.

                                  HTH

                                  Andrew


                                  • 14. Re: PC to Mac movie
                                    johnAq Level 1
                                    It sounds like the program is not properly resolving or constructing the filenames.

                                    On both Mac & PC files should have extensions, but you can turn off the display of them - this doesn't remove the suffix and you should include it in your code.

                                    hth


                                    johnAq