# bytesTotal issue with flashplayer 10?

**URL:** <https://forum.kirupa.com/t/bytestotal-issue-with-flashplayer-10/276960>\
**Category:** Uncategorized\
**Created:** [December 5, 2008, 4:24pm UTC](https://forum.kirupa.com/t/bytestotal-issue-with-flashplayer-10/276960 "2008-12-05T16:24:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![schnitzel](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@schnitzel](https://forum.kirupa.com/u/schnitzel)\
**Post date:** [December 5, 2008, 4:24pm UTC](https://forum.kirupa.com/t/bytestotal-issue-with-flashplayer-10/276960/1 "2008-12-05T16:24:23Z")

</div>

Hi Kirupa Forum ( 1st post 🙂 )

I made a preloader, and it work’s fine in my IDE of flash CS3(fllashplayer 9 installed).

But when i put it on the server, and run it my browser with FP 10 installed,  
it seems like the \*\*bytestTotal \*\* and **bytesLoaded** values are the same.  
They are increasing simultaneous.  
If i give a constant value instate of bytesTotal, it work’s 😑

Has anybody the same troubles?

Here is my preloader which should be ok:

```php

//import gs.*;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;

var contentLoadArea:MovieClip;
var contentLoader:Loader;
var loaded:Number;
//var swfPath:String="some.swf" +"?d=" + String(new Date().day);
var swfPath:String="some.swf";

//--> LOAD CONTENT
contentLoader = new Loader();
//contentLoaderInfo
contentLoader.load(new URLRequest(swfPath));
contentLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, contentLoading);
contentLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, contentLoaded);

//--> LOADING IN PROGRESS
function contentLoading(e:ProgressEvent):void {
	loaded = e.currentTarget.bytesLoaded /e.currentTarget.bytesTotal;
	
	bytes_tf.text=String(e.currentTarget.bytesLoaded); //debugfield1
	total_tf.text=String(e.currentTarget.bytesTotal); //debugfield2
	prozent_mc.prozent_txt.text= String(int(loaded*100));
	preloader_mc.preloader_bar_mc.width = loaded * preloader_mc.preloader_background_mc.width;
}

//--> LOADING COMPLETE
function contentLoaded(e:Event):void {
	// some tweening
	//TweenLite.to(preloader_mc, 1,{alpha:0, delay:0.2});
	//TweenLite.to(prozent_mc, 1.2,{alpha:0, delay:0.2, onComplete:endOfPreloading});
	endOfPreloading();
}

//--> SHOW CONTENT
function endOfPreloading():void{
	contentLoader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, contentLoading);
	contentLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, contentLoaded);
	
	removeChild(preloader_mc);
	removeChild(prozent_mc);
	
	contentLoadArea = MovieClip(contentLoader.content);
	addChild(contentLoadArea);
	contentLoader = null;
}

stop();

```
