You need to leave container storage internal and click store only a reference which stores only the path to the audio file.
I did a quick test using Windows 8 .
I created a button to set the path to a variable then insert the audio file into the container with the store only a reference checked.
The audio player then appeared in the container field. Note only the path is stored in the container field not the mp3 itself. If the file is moved from its location on the disk drive then the file will not play.
I corrected a typo the audio player appears in the container.
That would work if I wanted to drag all those files into containers, yes; but I'm asking how to simply point to the files via calculated path values - so that a player can play them externally.
Does that make sense?
No, you do not drag the files into the container.
1. Create a container field and a calculation path field.
2. Create a button
3. Connect this button to a script with the following script steps.
a. set variable $path to field path
b. go to field
c. insert audio file.
Thats all. The store only a reference means the path to the file is store in the container not the file itself.
Here is a sample file. https://www.dropbox.com/s/whlp2n98j344q6p/mp3ContainerSample.fmp12?dl=0
Thanks Stacy -
Stacy - I followed your instructions, and am now getting an error in filemaker that tells me the file at the end of the path could not be found. Although the value I set to the path variable will (when I paste it's value into the finder) does resolve to the mp3 file; but not in filemaker.
Here's a 5 min video on what did this time.
Here's the scrip I used..
And here's the resulting value set for the $$MULTIshowSelectedSeg variable..
/Users/w3/Documents/SwingThing/SwingThing HD Library for iTunes/Guest_ Mel Torme/Show#_ - MEL TORME_ PT. 2/1080-1 of Fred Hall's SWING THING.mp3
This path resolves perfectly in the finder, but not in filemaker.
So, perhaps you'll find the error in my attempt.
BTW - I was a developer at Beezwax Data tools for several years, before I decided I needed a break from FM.
I have been away from FM for about two years now; and am a lot rustier than I thought. LOL
I'm getting used to working with FMPA again - especially with FMPA 14's new scripting interface, which is quite a different experience.
Anyway.. thanks once again.
One more thing..
I wanted to see how FMPA created file references if I simply dragged in a file to the container field.
So I dragged in one of the mp3 files, and in the field definition's Storage area where I told it to "Store container data externally"..
I then told it to export that field's contents.
And when I had the data viewer display the reference info, this is what I got..
"remote: " and "MP3: " - make me wonder if the way I did it, i.e.,
.. might be wrong(?).
What do you think?
Never mind Stacy.I studied the example file you provided (I forgot to check it before writing any code this morning), and noticed you included the filemac:/Volume/ name in your path arguments. I mistakenly thought the volume name would be implicit.
Adding it fixes my problems.
So, problems solved, at last.
Sorry for not responding sooner, I been on the road all day today.
Glade you found your answer.
If the software is going to be available for PCs and Macs then I would add Get(SystemPlatform) to my calculation or script step. http://www.filemaker.com/help/html/func_ref2.32.72.html