Previously the very helpful folks at EaSynth helped me to embed audio files into a plot, so that my prototype could have auditory feedback when buttons were pressed or events were triggered. This was accomplished by a JavaScript hack, where the embed tag was placed onto the page as a non-visible text label. That tag was called by putting a JavaScript function into a conditional flow-control. This has been working great for user testing on my own computer.

Now I need to export my plot as DHTML and run it on a different computer. Since the sound files have an absolute file path to my own computer’s hard drive, they of course do not work on a different computer. I have tried naming the files with a relative address, and then copying the files to the directory of the exported DHTML plot. But that has not worked.

Please help soon, I need to get this fixed in the next 8 hours!


David Hoard

16 answers

I figured it out myself. I simply had the relative file name path typed incorrectly. I was trying variations of src = “///File:/path/filename” method that had worked on my own computer. But all you need to do is a standard, simple HTML reference: src = “filename.mp3”. It was so simple I overlooked it at first! Since adding audio to plots is a hack (at least in the current 2.47 version), I thought that it would necessarily be complicated. But I’m happy to be wrong in this case.

UPDATE – 1 hour later:
Wait – not quite. The exported DHTML files work fine on my computer and play the audio clips. But when the exported files are brought to other computers, the audio files either don’t play at all, or play all at once (even though autostart is set to false). This is bad- it’s likely tomorrow’s user test will be either canceled or not completely functional.

I really need a reliable way to email an exported DHTML set to another person / another computer, including the audio files. Please help.


Hi David, your workaround should work. Just use the relative file path like “test.mp3” or “music/test.mp3”, the path is relative to the generated DHTML directory.

I have no clue why it doesn’t work on another computers. Our testing shows that only Opera browser can not work correctly with this hack (will play only once after the simulation is loaded).


David, is there a registered application for mp3 extension on the other computers? That’s the only reason I can think of if the paths are correct. What browser you using? Security restrictions are possible.


Hi Xavier and Tim,
I’m pretty sure that the browsers we were using had registered applications for mp3 files. They were Chrome on Windows XP, IE on Windows 7. But I will double-check with my colleague – they were his test computers.

The weird thing was most of the browser/computer combinations played no sounds, but one of them played all of the sounds simultaneously when the page loaded. That was Chrome on the PC I think. All of the sounds are set to autostart=false in the embed tags.

I think we will have to cancel tomorrow’s test. I need a more robust solution before I can send my prototypes to other people. I’m hoping Xavier and the EaSynth team will integrate audio support into the next version of ForeUI, and quickly.

  1. The test computers had iTunes installed, so that would be the registered app.

David, zip up the generated html and email it to tim at, I’m intrigued (and clearly looking for a little distraction from my long running project..).

Even a cut down example will do the trick – alternatively, can you supply the exact text you place into the label and corresponding action to trigger the play of the mp3


Hi Tim,
Thank you for that generous offer. I will have to make a simple example, since the project I’m working on can’t be shown outside my company yet. I’ll whip it up and send it to you!

UPDATE: a simple example plot was sent to Tim.


Tim is reporting a very similar experience to ours: doesn’t work in Firefox or IE, autoplays in Chrome (Windows 7).


Hi David, please send me a copy as well, I will check it 🙂


Sent to Xavier at the address above.


By the way, when running the simulation on my computer, the browser would sometimes prompt me for a Quicktime accessory plug-in. I think this was due to one of the sound files being originally a .mov file, before I converted it (in Quicktime) to .mp3. Maybe this is causing the bug for all of the sound files?


Well, apart from your sample mockup having two textboxes with the same embedded code (one with a complete file path), the solution for Windows at least – change to .WAV file – works fine on Chrome and Firefox now.


Yup, as soon as I change the src back to an mp3, it stops working properly.

Surely some issue with the way the browsers handle the mp3 type


Hey, thanks very much Tim! Now I just need to find a utility for Mac that will convert .mp3 to .wav (GarageBand only exports to .mp3 and AAC).


Have you tested it? You can download a WAV here:


Thanks for helping, Tim.

I also figured out using .wav file can workaround this… I should read your replies first 🙂


I just wanted to follow-up on this:
1. Using .wav is the way to go– avoid mp3
2. If you want the sounds to play with an exported DHTML prototype, use relative address. In other words, in your hidden text-label embed tags, use src=”sound.wav” instead of src=”file:///mycomputer/myfiles/sound.wav”
3. Make sure your sound files are in the same folder as your index.htm file.
4. Also, doing step 2 will make it impossible to play the files when you are testing your simulation from within ForeUI. You need to export the DHTML and then open the index.htm file from your OS.

Many thanks to Tim and Xavier!

  1. Thanks for sharing the experience :-)

This question is now closed