# getBytesLoaded: \[type Function\]

**URL:** <https://forum.kirupa.com/t/getbytesloaded-type-function/7611>\
**Category:** flash\
**Created:** [November 4, 2002, 1:13pm UTC](https://forum.kirupa.com/t/getbytesloaded-type-function/7611 "2002-11-04T13:13:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mvlstar](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@Mvlstar](https://forum.kirupa.com/u/Mvlstar)\
**Post date:** [November 4, 2002, 1:13pm UTC](https://forum.kirupa.com/t/getbytesloaded-type-function/7611/1 "2002-11-04T13:13:04Z")

</div>

Hello,

I’m trying to load PHP data into a Flash movie, and it worked a couple of times. But now I get the following message when I try to write the loaded number of bytes to the screen:  
“getBytesLoaded: [type Function]”  
“getBytesTotal: [type Function]”

This is what I do:

```php

function writeStringFromDB(TextID,Language,ButtonID)
{
	var	stext = new LoadVars();
	stext.TextID = TextID;
	stext.Language = Language;

	var tstring = new LoadVars();
	stext.sendAndLoad("fetchText.php",tstring,"POST");
	tstring.onLoad = setText(tstring,ButtonID);
	Debug.text += "getBytesLoaded: " + tstring.getBytesLoaded + "
";
	Debug.text += "getBytesTotal: " + tstring.getBytesTotal + "
";

	function setText(textOBJ,ButtonID){
		Debug.text += textOBJ.toString();
	}
}

```

And the data returned isn’t found in the object, the object seems empty:  
PHP script looks like this:

```php

<?php
echo "TextString=TestTestTset";
?>

```

Thanx,  
Marcel

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 4, 2002, 4:09pm UTC](https://forum.kirupa.com/t/getbytesloaded-type-function/7611/2 "2002-11-04T16:09:03Z")

</div>

try getBytesLoaded()

just like it is trying to tell you, it is a function.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 4, 2002, 9:54pm UTC](https://forum.kirupa.com/t/getbytesloaded-type-function/7611/3 "2002-11-04T21:54:32Z")

</div>

Ok, that was not so bright…  
Now it workts but I still don’t get ANY data. The function getBytesLoaded doesn’t show anything, not even a zero.

What am I doing wrong, the object seems totally empty! But somehow it receives data since the onLoad function is called.

Tanx

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 5, 2002, 6:38pm UTC](https://forum.kirupa.com/t/getbytesloaded-type-function/7611/4 "2002-11-05T18:38:53Z")

</div>

No ideas at all???
