file - Determining data size through URLLoader (AS3) -


I am working on a project and due to the backend limit the problem has come to a little bit of the program for me To use.

First of all of my questions, "Can I measure the data size of text through the URLLoader?".

I am creating an app and sending a fair data, but the last time I am using, only limited to being able to send me 1024 at a time.

The backend is called 'sokuode', it's really good for games and user management and like, but I am using it in a different way.

All the parties, my point is, I am sending data through an array, and I can easily break enough array and send it to multiple transactions ... but in a way Can I measure the size of the data?

In this way, I could determine how much I can send the array in a timely manner.

These codes provide them:

  function getGame (): zero {var url: String = "API URL"; Var Request: URLRequest = New URLRequest (url); Var requestVars: URLVariables = new URLVariables (); Request.data = requestVars; RequestVars.api_key = "Your API Key"; RequestVars.game_id = "Your Game ID"; RequestVars.response = "XML" requestVars.username = "player username" requestVars.key = "your key" requestVars.value = "main value" request.method = URLRequestMethod.POST; Var urlLoader: URLLoader = new URL loader (); UrlLoader = new URL loader (); UrlLoader.dataFormat = URLLoaderDataFormat.TEXT; UrlLoader.addEventListener (Event.Complete, Loader ComprehensiveHandler); UrlLoader.load (request); } Function loader complexheldler (Event: Event): Zero {trace ("ResponseWare:" + event.target.data); }  

URL loader has property in class BytesTotal . You should be able to determine the size of the data through it.

  function loader complexheldler (event: event): zero {trace ("reactions:" + event.target.data); Trace ("Size:" + URL loader (event.target) .bytesTotal); }  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -