Hi,
I have posted already here a problem I have - but it seems there’s no solution; it’s driving me crazy. In my project, at the beginning, I load some variables from a text file (intro.txt), namely:
&containerMC.daTextBox=Text goes here&&textloaded=OK&
I have a container, named containerMC with a dinamic text box which variable has the name daTextBox. In the first frame of the movie, I have the following code:
System.useCodepage = true;
/:textloaded="";
btemp = Math.round(Math.random()*(1000000-1))+1;
loadVariablesNum("intro.txt?x="+btemp,0);
In the second frame:
//trying again...
btemp = Math.round(Math.random()*(1000000-1))+1;
loadVariablesNum("intro.txt?x="+btemp,0);
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes / 1024);
totalkbytes = Math.ceil(totalbytes / 1024);
totloaded = int(loadedbytes / (totalbytes / 100));
orbitMC.percent = totloaded + "% loaded...";
if (loadedbytes == totalbytes)
{
if (/:textloaded == "OK")
{
System.useCodepage = true;
orbitMC.percent = "";
gotoAndPlay(4);
} // end if
} // end if
In the third, obviously:
gotoAndPlay(2);
One of the buttons, has the same source. So I placed the code:
on (press)
{
System.useCodepage = true;
/:textloaded="";
containerMC.daTextBox = "";
btemp = Math.round(Math.random()*(1000000-1))+1;
loadVariablesNum("intro.txt?x="+btemp,0);
titleMC.Title1 = "HOME";
titleMC.Title2 = "HOME";
titleMC.gotoAndPlay(2);
}
Ok - it might seem a mess. Problem: when I load the page in IE or Mozilla, whatever, the text sometimes appears, others it doesn’t. I know the text file is saved in the cache - that’s why I created the dummy variable btemp. Even so, sometimes it works, most of the times it doesn’t.
I’m really tired - this problem is unsolved for more than a week. Others websites I have of the same type work well - this one doesn’t!
How do I solve this - with a fresh start?
Kind regards,
Kepler