# Seriously: loading text is driving me crazy

**URL:** <https://forum.kirupa.com/t/seriously-loading-text-is-driving-me-crazy/166049>\
**Category:** flash\
**Created:** [October 16, 2005, 2:39pm UTC](https://forum.kirupa.com/t/seriously-loading-text-is-driving-me-crazy/166049 "2005-10-16T14:39:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kepler](https://avatars.discourse-cdn.com/v4/letter/k/71c47a/32.png) [@kepler](https://forum.kirupa.com/u/kepler)\
**Post date:** [October 16, 2005, 2:39pm UTC](https://forum.kirupa.com/t/seriously-loading-text-is-driving-me-crazy/166049/1 "2005-10-16T14:39:41Z")

</div>

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:

```auto

&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:

```auto

System.useCodepage = true;
/:textloaded="";
btemp = Math.round(Math.random()*(1000000-1))+1;
loadVariablesNum("intro.txt?x="+btemp,0);

```

In the second frame:

```auto

//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:

```auto

gotoAndPlay(2);

```

One of the buttons, has the same source. So I placed the code:

```auto

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
