Skip to main content
Participant
May 18, 2006
Question

loading sound previews?

  • May 18, 2006
  • 2 replies
  • 239 views
is there any way to protect sound samples, which i would like to present on my page?.. i understand loading mp3s via Sound.loadSounc() method, but flash is not strong against decompiling.. only way i know to put mp3 path is via .swf parameter - load directly from given path or give to flash some id and load mp3 from some php (or whatever) script.. but if somebody crack my swf, reads address from script - my mp3s could be downloaded too ..

my first idea how solve this problem was make two .swfs. one public, loaded on page, second "secret" hidden from http. first clip would load second one.. but im not sure, if one clip can load second clip "locally" on server.. :s
This topic has been closed for replies.

2 replies

June 24, 2006
Hi there,
I try to protect my audio files, mp3, using PHP script, which send in header
header("Expires: 0");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
@readfile("armin.mp3");

this won`t cache the mp3 file, and I can play it in Flash under FF, or Opera. But if I want to play this PHP script, aka mp3, in Flash under IE, there is problem. No sound. Nothing is loaded.
Is it a bug of IE flash plugin? because when this works under FF, it should work under IE too.
Please help me, or please release new version of IE flash plugin with this support.
thx very much.
Inspiring
May 18, 2006

Maybe .htaccess

or one other solution would be to place the .mp3 outside the root directory.

And reference the path in your swf

mypath = "../"
mySound = new Sound();
mySound.loadSound(mypath+audio, true);

tis way all your mp3's are outsde the root directory so no one can download them.