View Full Version : [AS2] flvplayer contentPath does not update dynamically everytime

02-18-2010, 10:27 AM
Hi People

Have a slight problem with updating the flvPlayer contenPath dynamically from external php file.

Everything below works ok. However the problem is occasionally I think the time it takes for the loadVars to populate is lagging behind the flvPlayer component appearring on screen and hence missing the path being set from the variable loaded. So I need to add something in that will check that the variables are loaded before using it in the flvplayer contentPath. I'm sure this is something basic but it is alluding me. I have tried adding a second frame and pointing it back to frame 1 with gotoAndStop(1); This seems to work a bit better but still doesn't load the .flv all the time.

Any help much appreciated.

Code is as follows:

myfile = '/video/url.php?s='+_root.section+'&ui='+mid;

contmc.mytitle.html = true;
contmc.mydes.html = true;

movieCont = new LoadVars();
//Process the data when it is loaded
movieCont.onLoad = function(success) {

_root.video_cont.contentPath = this.myurl;
contmc.mytitle.htmlText = this.mytitle;
contmc.mydes.htmlText = this.mydes;
//load the data to start