A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: how to delete global variables

  1. #1
    When i use "loadVariables(something)" from a textfile or a php script, the impoerted variables are all global, right ???

    Ok this is somewhat bad, cause when i do this serveral times or get a lot of them, the next time is use loadVariables (in this case to get them from a PHP-Page) - loadVariables will send all variables stored in my flash to the Page.........

    When there´s to many of them - it wont work anymore and I get the following output from DEBUG/LIST VARIABLES............

    <H1>Request-URI Too Large</H1>
    The requested URL's length exceeds the capacity
    limit for this server.

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    there is delete which does not seem to work - but you could attach a special loading movieclip from the library and use
    loadvariables('yourfile.txt', clipname)
    When you are done retrieving variables from the clip, just delete the clip nd you get rid of all these extra vars at once. On the other hand, you have to copy variables you want to send into the clip - this effectively stops sending percentloaded and similar stuff that might still exist on your main timeline

    Musicman

  3. #3
    Member
    Join Date
    Aug 2000
    Posts
    66
    interesting. does anyone know the number of variables that starts to cause problems? i realize this might be server dependent, but i am just looking for an average. are we talking hundreds, thousands, or as small as 40?

  4. #4
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    I think there is sort of a promise that at least one or 2 k of variables should be possible within the URL. It is also psooible that some particular browser or client OS imposes a limit.
    Even if the vars fit, it still might be an idea to send only selected variables - for an example how NOT to do it see the well-known FK guestbook: it is posting the entire guestbook back to the server whenever someone signs..

    Musicman

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center