Hello everyone,
I am having issues with ProgressEvent.PROGRESS…
I read somewhere that it might be some kind of problem with windows 7, but not sure…
http://www.uploadify.com/forum/#/discussion/6240/progressevent-progress-doesnt-work-in-windows-7/p1
So i came here for further help…
It just doesnt work, there is not “progress” it only works when it is 100% done.
Here is the code:
var assetLoader:URLLoader = new URLLoader();
assetLoader.load (new URLRequest("http://www.whatever/file.txt"));
assetLoader.addEventListener (ProgressEvent.PROGRESS, progressHandler);
function progressHandler (event:Event):void
{
var percentLoaded:Number = event.currentTarget.bytesLoaded/event.currentTarget.bytesTotal;
percentLoaded = Math.round(percentLoaded * 100);
trace("Loading: "+percentLoaded+"%");
txt.text = percentLoaded+" %";
}
The funny thing is that it actually shows on the trace, but when i put it on the web, no progress showing the percentage loaded.
Kind regards,
Cheers,
Leo.