all groups > macromedia flash flashcom > august 2006 >
You're in the

macromedia flash flashcom

group:

Streaming Flash Audio Crashing Browsers


Streaming Flash Audio Crashing Browsers jesruiz
8/21/2006 11:16:19 PM
macromedia flash flashcom:
We have a site that uses flashcom streaming and it worked great with the flash
8 player and 7 player but now that they upgraded to the flash player 9 it
causes browsers to crash. I think it may be related to some older as2 syntax
and was wondering if anyone has run into this issue. Im just starting to dive
into as3 and spoke to someone who said to look into updating my syntax to as3.

Thanks for any help,
Jesse
Re: Streaming Flash Audio Crashing Browsers JayCharles
8/21/2006 11:43:21 PM
All of my FMS/FCS apps seem to be working fine with FP9.

Maybe if you post the code you are using for your netconnections/netsreams
someone will spot the problem. If you have any methods that are invoked by the
status methods of the nc's/ns's , you might want to post that too.
Re: Streaming Flash Audio Crashing Browsers jesruiz
8/21/2006 11:58:35 PM
Well first I load all the php vars that tell my player how many mp3 tracks to
load.

//loads the variables into flash
myData = new LoadVars();
myData.load(php);
myData.onLoad = function() {
gotoAndStop(7);
};

Here is all the code that works with the player. Im using Vitalstream to host
my music, so here is how I connect.

stop();

/////////////////////////////////////////////////////
// Catch 0 mp3s
if (myData.audiotracks == 0){
band_name = myData.band_name;
tot_plays = [myData.totalplays]+" Total Plays";
tod_plays = [myData.todaysplays]+" Today Plays";
tn1 = "No Audio Available";
gotoAndStop(8);
}

/////////////////////////////////////////////////////
// Steady Variables
band_name = myData.band_name;
song_name = myData.tn1;
mediaDisplay.stream = myData.fn1;
song_id = myData.fn1;
tn1 = myData.tn1;
fn1 = "MP3:audio/toc/"+ myData.fn1;
tot_plays = [myData.totalplays]+" Total Plays";
tod_plays = [myData.todaysplays]+" Today Plays";

/////////////////////////////////////////////////////
// set starter var for loop
origy=85;

/////////////////////////////////////////////////////
// For loop to load tracks
for (var i = 1; i <= myData.audiotracks; i++ ){
trace("Count Down "+ i);
_root["tn"+i] = myData["tn"+i];
_root["plays"+i] = myData["plays"+i]+" Plays";
// dup track button
duplicateMovieClip(track_but, "track_but" + i, i);
_root["track_but"+i]._y = origy;
_root["track_but"+i]._x = 132;
origy = origy + 16;
_root["track_but"+i].j = i;
// button actions
_root["track_but"+i].onRelease = function () {
trace ("onRelease called " + "MP3:audio/toc/"+ myData["fn"+this.j]);
song_id = myData["fn"+this.j];
song_name = myData["tn"+this.j];
// load stream
_root.mediaDisplay.stream = "MP3:audio/toc/"+ myData["fn"+this.j];
};

}



/////////////////////////////////////////////////////
// Connect to stream

initObj = new Object();
initObj.scaling = "keepRatio";
initObj._width = 475;
initObj._height = 300;
initObj.bufferTime = 15;
initObj.directLink = "path_to_audio";
initObj.skin = new BattletocSkin();

_root.attachMovie("VSMediaPlayer", "mediaDisplay", 0, initObj);
_root.mediaDisplay._x = 0;
_root.mediaDisplay._y = -300;


Whats weird is that it plays find but once you try to leave the page it locks
your browser.
Thanks for any help.
Jesse
Re: Streaming Flash Audio Crashing Browsers jesruiz
8/22/2006 2:38:27 PM
Okay so I started to go through all my code commenting things out to see what
will stop the freezing when published to html. I found when this code is
commented no freezing, but of course the player doesn't play so maybe I need to
find a different way of doing this.

_root.attachMovie("VSMediaPlayer", "mediaDisplay", 0, initObj);

Thanks,
Jesse
AddThis Social Bookmark Button