Has anyone been successful in using a QT video player in a 2.7.1 standalone? Any tutorials available?

Devin Asay devin_asay at byu.edu
Fri May 5 12:54:35 EDT 2006


On May 4, 2006, at 4:03 PM, Dr. Robert E. Ball wrote:

> I am unable to successfully develop a standalone (on a Mac with OS  
> 10.4.6
> using Rev 2.7.1) from a stack containing a QT player. The stack  
> works fine
> in the IDE and properly plays the video. No problems. However, when  
> I try to
> build a standalone, no matter where I put the external QT file,  
> with the
> appropriate location given in the Copy Files in the Standalone  
> Application
> Settings, the standalone builder either does not attach the file as  
> part of
> the application package, or even when it occasionally does attach  
> it, the
> app doesn't play it. (I couldn't make a standalone that worked  
> correctly in
> 2.5.1 either.) I can't find any information/tutorial on how to do this
> correctly.

How are you referencing the video file in your player object (i.e.,  
what's its filename property)? Are you giving the full path name? Or  
are you setting the defaultFolder and using just the file's name or a  
relative path?

I never use the Copy Files feature, opting instead to manually move  
files to where they need to be after creating the standalone. Where  
the compiled app looks for the files depends on how you set it up.  
There are three common scenarios:

1. Set the defaultFolder. If you do this, and, for example, set the  
defaultfolder to be the folder containing your stack, then after you  
compile the stack, the defaultfolder is the "MacOS" folder inside the  
application package. To get to this, control click the app file and  
choose "Show Package Contents". Then go to Contents/MacOS.

2. Don't explicitly set the defaultFolder, but use it to locate files  
after compiling. If you never set the defaultFolder in your stack,  
after you compile the stack the defaultFolder is the folding  
containing the .app file. Anything in this folder that is referred to  
by name only in the application will be found.

3. Store a file path in a global variable or custom property. You  
store a hard-coded file path in the stack. This obviously can cause  
problems if you move the stack or app to another machine, but can  
work if you're sure the path will never change. One scenario in which  
this works well is when you want to access the video file from a web  
server. But it doesn't sound like that's what you're doing.

Locating external files can be a maddening exercise if you're not  
sure of how Rev does things. The approaches described here have  
worked well for me.

HTH

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list