FORUMS: list search recent posts

MP3 loading problems

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Grant Beecher
MP3 loading problems
on May 25, 2010 at 1:13:11 pm

Hey guys,
I'm a total amateur at this, so I'm not sure if this is an appropriate forum to ask an amateur question, but I'm going to ask anyway.

The problem I'm having is with my professional photography website, located at http://www.grantbeecherphoto.com . I just added music to it yesterday, in MP3 format (licensed, of course), but sometimes it loads and sometimes it doesn't. What's the deal? I put a line of code in the html file that disallows the swf to cache, but the problem is still there. The website template I purchased a year ago came with a built-in player, so I'm using that. Here's the code for the player.

stop();
var s = new Sound();
var pos = 0;
var plays = true;
var MP3 = "";
function loadMP3() {
if (MP3 != undefined && MP3 != "") {
s.loadSound(MP3,true);
s.start(0,0);
plays = true;
sound_control_mc.play();
s.onSoundComplete = function() {
refreshMP3();
};
} else {
plays = false;
sound_control_mc.stop();
}
}
function refreshMP3() {
s.stop();
randomMP3();
loadMP3();
}
function randomMP3() {
var lengths = _root.MP3s.length;
var rnd = Math.round(Math.random()*(lengths-1));
if (MP3 != _root.MP3s[rnd]) {
MP3 = _root.MP3s[rnd];
} else {
randomMP3();
}
}
function playMP3() {
if (MP3 != undefined && MP3 != "") {
s.start(pos,0);
plays = true;
sound_control_mc.play();
}
}
function pauseMP3() {
if (MP3 != undefined && MP3 != "") {
s.stop();
plays = false;
pos = s.position/1000;
sound_control_mc.stop();
}
}


Any ideas on how to get some consistency?

Thanks in advance for any wisdom shared. :)


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]