Jump to content
Search Community

AuditSize Question

Jason Miller test
Moderator Tag

Recommended Posts

Hello...

 

I am curious if there is a way to auditSize on a LoaderMax instance prior to actually doing the load. In my app I am prompting the user with a confirmation dialog box that needs to state the size of the download, and then asks them to confirm if they want to continue, or cancel out.

 

Just curious if there is an easy way to handle this, or if it will require actually starting and stopping the download to get these numbers.

 

Thanks!

Link to comment
Share on other sites

Nevermind. A little digging through the source code and I found my answer.

 

This would definitely be helpful if documented somewhere, as well as maybe use the standard event such as LoaderEvent.AUDIT_COMPLETE or whatever.

 

Anyways, sorts me out and hopefully helps others.

 

loader.addEventListener("auditedSize", onAuditSize);
loader.auditSize();

private function onAuditSize (event:Event):void {
 trace(loader.bytesTotal);
}

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...