Loadvariables (Movieclip.loadvariables Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Example
The following example creates a new movie clip, and then creates child inside of it and loads a
PNG image into the child. This lets the parent retain any instance values that were assigned
prior to the call to
loadMovie
var mc:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mc.onRelease = function():Void {
trace(this.image._url); // http://www.w3.org/Icons/w3c_main.png
}
var image:MovieClip = mc.createEmptyMovieClip("image",
mc.getNextHighestDepth());
image.loadMovie("http://www.w3.org/Icons/w3c_main.png");
The
MovieClip.getNextHighestDepth()
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
See also
_lockroot (MovieClip._lockroot property)
,
method)

loadVariables (MovieClip.loadVariables method)

(MovieClip.loadMovie method)
,
MovieClipLoader
onClipEvent handler
unloadMovie function
loadVariables (MovieClip.loadVariables method)
public loadVariables(url:String, [method:String]) : Void
Reads data from an external file and sets the values for variables in the movie clip. The
external file can be a text file that Macromedia ColdFusion generates, a CGI script, an Active
Server Page (ASP), a PHP script, or any other properly formatted text file. The file can
contain any number of variables.
You can also use the
loadVariables()
with new values.
The
loadVariables()
format: application/x-www-form-urlencoded (CGI script format).
In SWF files running in a version earlier than Flash Player 7,
superdomain as the SWF file that is issuing this call. A superdomain is derived by removing
the left-most component of a file's URL. For example, a SWF file at www.someDomain.com
can load data from a source at store.someDomain.com because both files are in the same
superdomain of someDomain.com.
.
method used in this example requires Flash Player
MovieClip.getNextHighestDepth()
,
onPress (MovieClip.onPress handler)
,
,
unloadMovieNum function
method to update variables in the active movie clip
method requires that the text of the URL be in the standard MIME
,
unloadMovie (MovieClip.unloadMovie
,
on handler
loadMovieNum function
url
method.
,
loadMovie
,
,
must be in the same
MovieClip
891

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF