-
ProgressEvent.PROGRESS issue... it only shows when it is 100%...
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/#/dis...n-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:
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.
-
Total Universe Mod
Try a bigger file. It's possible there is no "progress" to speak of.
Also, you should be getting an error since your progressHandler is expecting an Event and assetLoader is broadcasting a ProgressEvent.
-
Yeap, makes sense since i am using a 156kb file.
Thanks for the tip.
Regards,
Leo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|