Change some colors

Goal: Change some colors.

test1: sound at default bitrate - test2: long local sound at 128kbps - test3: external sound at 56kbps

Javascript function

<script language="JavaScript">
var flag=false;
function changeColors(p) {
p.SetVariable('my_color1','0x463C6F');
p.SetVariable('my_color2','0xCC0000');
flag = true;
}
function play(url, bitrate) {
var default_bitrate = 32;
if (bitrate==undefined) { bitrate=default_bitrate; }
var p = window.document.mp3player;
if (flag==false) { changeColors(p); }
p.SetVariable("my_bitrate", bitrate);
p.SetVariable("url", url);
}
< /script>

Note that it's possible to change background color dynamically, but it's better to edit the source .fla files and modify the myBackground clip manually.

Links code

<a href="javascript:void(0);" onclick="play('sounds/033_052_01_bruit.mp3');">test1: sound at default bitrate</a> -
< a href="javascript:void(0);" onclick="play('sounds/amberwaves.mp3', '128');">test2: long local sound at 128kbps</a> -
< a href="javascript:void(0);" onclick="play('http://pyg.keonox.com/flashmp3player/sounds/Frankie56.mp3', '56');">test3: external sound at 56kbps</a>