Close   

Admin and announcement forums

    30 Mar 2008
Load php variables in to flash  
kumar rakesh
create and manage free online surveys with unlimited responses
Online surveys are now basic requirement of everyone who want to review there products or to make studies about anything. But finding a solution who can provide esurveys efficiently is really a big pain. creating an online survey with inefficient tool as irritating and getting survey conducted with limitations on responses is even worse.
cont..
    30 Mar 2008
Load php variables in to flash  
kumar rakesh
practice interviews and prepare for interviews
in todays changing world every one want to increase there salaries very quickly.
Changes your employer is an very efficient solution for this. But changing employer and company is not so easy.

cont..

Viewed 202 times
Total posts : 0

    07 Feb 2008
Load php variables in to flash  
kumar rakesh
His other forums
Load php variables in to flash
Variable from php or any other scripting language can be loaded from flash and from flash to those files. Many functions are there available in flash for loading variables e.g.

loadVariables
loadVars
getURL
loadVariablesNum
loadMovie
loadMovieNum

and others are

load
send
sendAndLoad


for xml are
XML.send
XML.load
XML.sendAndLoad

etc..

in this post i'll explain "loadVariables" function.

LoadVariables


Availability

Flash Player 4.


Usage

Code:
loadVariables ("url" ,level/"target" [, variables])

Parameters

url An absolute or relative URL where the variables are located. If you access the movie using a Web browser, the host for the URL must be in the same subdomain as the movie itself.

level An integer specifying the level in the Flash Player to receive the variables. When you load variables into a level, the action in the Actions panel in normal mode becomes loadVariablesNum; in expert mode, you must specify loadVariablesNum or choose it from the Actions toolbox.

target The target path to a movie clip that receives the loaded variables. You must specify either a target movie clip or a level (level) in the Flash Player; you can't specify both.

variables An optional 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.


Returns

Nothing.


Description

Action; reads data from an external file, such as a text file or text generated by a CGI script, Active Server Pages (ASP), or PHP, or Perl script, and sets the values for variables in a Flash Player level or a target movie clip. This action can also be used to update variables in the active movie 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). The movie and the variables to be loaded must reside at the same subdomain. Any number of variables can be specified. For example, the phrase below defines several variables:

company=Macromedia&address=600+Townsend&city=San+F rancisco&zip=94103

The first movie to open in an instance of the Flash Player loads into the bottom level (identified in code as _level0). When you use the loadMovie or loadMovieNum action to load subsequent movies into the Flash Player, you must assign a level number in the Flash Player or a target movie clip into which each movie will load. When you use the loadVariables action, you must specify either a Flash Player level or a movie clip target into which the variables will load.


Example

This example loads information from a text file into text fields into the varTarget movie clip on the main Timeline. The variable names of the text fields must match the variable names in the data.txt file.
Code:
on(release) {
loadVariables("data.txt", "_root.varTarget");
}
Quote:
loadVariablesNum


Availability

Flash Player 4. Flash 4 files opened in Flash 5 will be converted to use the correct syntax.


Usage

Code:
loadVariables ("url" ,level [, variables])

Parameters

url An absolute or relative URL where the variables are located. If you access the movie using a Web browser, the host for the URL must be in the same subdomain as the movie itself.

level An integer specifying the level in the Flash Player to receive the variables.

variables An optional 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.

Returns

Nothing.


Description

Action; reads data from an external file, such as a text file or text generated by a CGI script, Active Server Pages (ASP), or PHP, or Perl script, and sets the values for variables in a Flash Player level. This action can also be used to update variables in the active movie with new values. When you load variables into a level, the action in the Actions panel in normal mode becomes loadVariablesNum; in expert mode, you must specify loadVariablesNum or choose it from the Actions toolbox.

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). The movie and the variables to be loaded must reside at the same subdomain. Any number of variables can be specified. For example, the phrase below defines several variables:

company=Macromedia&address=600+Townsend&city=San+F rancisco&zip=94103

The first movie to open in an instance of the Flash Player loads into the bottom level (identified in code as _level0). When you use the loadMovie or loadMovieNum action to load subsequent movies into the Flash Player, you must assign a level number in the Flash Player or a target movie clip into which each movie will load. When you use the loadVariablesNum action, you must specify a Flash Player level into which the variables will load.


Example

This example loads information from a text file into text fields in the main Timeline of the movie at level 0 in the Flash Player. The variable names of the text fields must match the variable names in the data.txt file.
Code:
on(release) {
loadVariablesNum("data.txt", 0);
}
Load php variables in to flash Load php variables in to flash
Load php variables in to flash Be first to reply this discussion.
Load php variables in to flash Load php variables in to flash Load php variables in to flash

Login to participate in forums
jump to :
Post reply on this forum

Comment on this forum
Name :
Email :
Comments :
Legends
Load php variables in to flash Forums tagged Load php variables in to flash Forums tagged. But locked for further reply
="Load Forums locked. can not accept further replies Load php variables in to flash General forum