Просмотр полной версии : Как подгружать текст из *.txt
Подскажите пожалуйста, как подгружать в клип текст из внешнего txt, текст- РУССКИЙ. Огромное спасибо! :confused:
Usage
loadVariables(url, target [, variables])
Operands
url A string representing an absolute or relative URL where the variables are located. If the SWF file issuing this call is running in a web browser, url must be in the same domain as the SWF file.
target The target path to a movie clip that receives the loaded variables.
variables An optional string parameter specifying an HTTP method for sending variables. The parameter must be the string GET or POST. If there are no variables to be sent, omit this parameter. The GET method appends the variables to the end of the URL and is used for small numbers of variables. The POST method sends the variables in a separate HTTP header and is used for long strings of variables.
Description
Function; reads data from an external file, such as a text file or text generated by a ColdFusion, CGI, Active Server Pages (ASP), PHP, or Perl script, and sets the values for variables in a target movie clip. This function can also update variables in the active SWF file with new values.
The text at the specified URL must be in the standard MIME format application/x-www-form-urlencoded (a standard format used by CGI scripts). Any number of variables can be specified. For example, the following phrase defines several variables:
company=Macromedia&address=600+Townsend&city=San+Francisco&zip=94103
To load variables into a specific level, use the loadVariablesNum() function instead of the loadVariables() function.
Example
The following examples load variables from a text file and from a server:
// load variables from text file on local file system (Symbian Series 60)
on(release, keyPress "1") {
filePath = "file://c:/documents/flash/myApp/myvariables.txt";
loadVariables(filePath, _root);
}
// load variables (from server) into a movieclip
urlPath = "http://www.someserver.com/myvariables.txt";
loadVariables(urlPath, "myClip_mc");
help рулит:quiet:
MINASTIS
23.07.2006, 15:17
XML учи. Перед этим текст в юникоде сохрани.
Dead.SouL
24.07.2006, 02:00
Ищи в Поиске на форуме, таких тем дофига было! Точняком ответ найдёшь!
Вот , даже с прелоадером (http://www.blog.kuzen.ru/?p=36))))
Работает на vBulletin ® версия 3.7.3. Copyright ©2000-2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Copyright © 1999-2008 Flasher.ru. All rights reserved.