×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    38

    loadVars() and local connection

    Hi there,

    I have a Flash Lite 2.0 movie that exchanges some data with a Symbian application through a very simple http "server" running locally (Nokia N95).
    I am using loadVars() to exchange data between Flash and Symbian - i.e. data is returned as urlencoded name=value pairs to Flash (e.g. name=value&another_name=another_value&).
    The Flash Player throws an out of memory error if the returned encoded string is longer than 32 bytes (or 32 characters) - the message in the UI is something like "Not enough memory...". Everything works fine if the returned data is less than 32 bytes. The same happens using loadVariables.

    Anyone have had similar issues?
    Many thanks,
    Dave

  2. #2
    Product Specialist
    Join Date
    Jun 2003
    Location
    UK
    Posts
    191

    Re: loadVars() and local connection

    Hi Dave,

    Other developers have determined that the limits are roughly as follows:

    [TEXT]
    -characters in a textfield: ~63000 (?)
    -rotation of dynamic or input textfields w/o embedded fonts or static w/ device fonts: 0 (no rotation)
    -max size of POST data (loadVars and XML Objects etc): around 64k
    -characters for URLs set in Character panel: 127

    If you are using HTTP POST then theoretically there is no upper limit but memory is tight.

    Note that 32 characters and 32 kb of text are not the same thing. Text in Flash is UTF8 encoded which is 1byte per character using basic latin characters. 32kb of text is a considerable amount of data and therefore you should consider using loadVars to 'page' parts of the text that the user can actually see.

    Mark
    Mark Doherty
    Developer Evangelist
    Adobe Systems, Mobile and Devices EMEA

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    38

    Re: loadVars() and local connection

    Thank you Mark, that's useful info.
    My app hits the problem after just 32 characters of data are returned (using both GET and POST mode) by loadVars over a local http connection.
    I'll double check the Symbian code that writes the result in the HTTP respose - maybe the problem is there

    Davide

  4. #4
    Registered User
    Join Date
    Dec 2007
    Posts
    1

    Re: loadVars() and local connection

    Another solution is use SWX. But you have to implement some PHP logic on your HTTP server.

  5. #5
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    67

    Re: loadVars() and local connection

    Hi Dave

    I am using the same technique and I have not encountered any limit at 32 bytes of returned data - I've definitely returned quite a bit more than this.
    I'm confused when you talk about returning data using GET or POST mode - do you mean the request to the server using loadvariables you've tried in both GET and POST? Because the return from the server is identical in each case.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×