03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

■ The Flash Player 9 Security white paper at http://www.adobe.com/go/fp9_0_security<br />

■ The Flash Player 8 Security-Related API white paper at http://www.adobe.com/go/<br />

fp8_security_apis<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 4 - Flash 4 files opened in Flash 5 or later are<br />

converted to use the correct syntax. The ability to load JPEG files is available as of Flash<br />

Player 6. The ability to load unanimated GIF files, PNG files, or progressive JPEG files is<br />

available as of Flash Player 8.<br />

Parameters<br />

url:String - The absolute or relative URL of the SWF or JPEG file to be loaded. A relative<br />

path must be relative to the SWF file at level 0. For use in the st<strong>and</strong>-alone Flash Player or for<br />

testing in test mode in the Flash authoring application, all SWF files must be stored in the<br />

same folder <strong>and</strong> the filenames cannot include folder or disk drive specifications.<br />

level:Number - An integer specifying the level in Flash Player into which the SWF file will<br />

load.<br />

method:String [optional] - Specifies an HTTP method for sending variables. The parameter<br />

must be the string GET or POST . If there are no variables to be sent, omit this parameter. The<br />

GET method appends the variables to the end of the URL <strong>and</strong> is used for small numbers of<br />

variables. The POST method sends the variables in a separate HTTP header <strong>and</strong> is used for<br />

long strings of variables.<br />

Example<br />

The following example loads the JPEG image tim.jpg into level 2 of Flash Player:<br />

loadMovieNum("http://www.helpexamples.com/flash/images/image1.jpg", 2);<br />

See also<br />

unloadMovieNum function, loadMovie function, loadClip<br />

(MovieClipLoader.loadClip method), _level property<br />

loadVariables function<br />

loadVariables(url:String, target:Object, [method:String]) : Void<br />

Reads data from an external file, such as a text file or text generated by ColdFusion, a CGI<br />

script, Active Server Pages (ASP), PHP, or Perl script, <strong>and</strong> sets the values for variables in a<br />

target movie clip. This action can also be used to update variables in the active SWF file with<br />

new values.<br />

Global Functions 75

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!