
loadVariablesNum() Global Function
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
574
|
ActionScript Language Reference
and sent to the remote script. If method is set to "POST", the variables are sent after the
HTTP POST-request header. The
"POST" method was not available in the Standalone Player
for Windows prior to Flash 6, but it is functional in the Flash 6 Standalone Player for
Windows (see Appendix F for details on support for GET and POST). Because most web
servers restrict the length of URLs to no more than 1024 characters (and some to as little as
255 characters), use
"POST" instead of "GET" to transfer larger amounts of data.
For important information on domain-based security restrictions that apply to
loadVariables( ), see
System.security.
Usage
The results of multiple loadVariable( ) calls to the same url may be cached by some
browsers, preventing new data from loading from the server. To avoid this problem,
append a dummy variable to each loadVariables( ) call so that the URL is unique. For
example, here we generate a unique URL by appending the time in milliseconds:
loadVariables("http://www.mysite.com/cgi-bin/myScript.pl?cacheKiller="
+ new Date().getTime(), serverResponse);
Bugs
The POST method is not supported by Internet Explorer 4.5 on Macintosh. This problem
was fixed in Version 5 of the browser.
On Macintosh, the