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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Returns<br />

Number - The length of the specified string or variable.<br />

Example<br />

The following example returns the length of the string "Hello": length("Hello"); The<br />

result is 5.<br />

See also<br />

" string delimiter operator, String, length (String.length property)<br />

loadMovie function<br />

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

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

Loads a SWF, JPEG, GIF, or PNG file into a movie clip in Flash Player while the original<br />

SWF file is playing. <strong>Support</strong> for unanimated GIF files, PNG files, <strong>and</strong> progressive JPEG files<br />

is added in Flash Player 8. If you load an animated GIF, only the first frame is displayed.<br />

Tip: If you want to monitor the progress of the download, use<br />

MovieClipLoader.loadClip() instead of this function.<br />

The loadMovie() function lets you display several SWF files at once <strong>and</strong> switch among SWF<br />

files without loading another HTML document. Without the loadMovie() function, Flash<br />

Player displays a single SWF file.<br />

If you want to load a SWF or JPEG file into a specific level, use loadMovieNum() instead of<br />

loadMovie().<br />

When a SWF file is loaded into a target movie clip, you can use the target path of that movie<br />

clip to target the loaded SWF file. A SWF file or image loaded into a target inherits the<br />

position, rotation, <strong>and</strong> scale properties of the targeted movie clip. The upper left corner of the<br />

loaded image or SWF file aligns with the registration point of the targeted movie clip.<br />

Alternatively, if the target is the root Timeline, the upper left corner of the image or SWF file<br />

aligns with the upper left corner of the Stage.<br />

Use unloadMovie() to remove SWF files that were loaded with loadMovie().<br />

When using this function, consider the Flash Player security model.<br />

For Flash Player 8:<br />

■ Loading is not allowed if the calling movie clip is in the local-with-file-system s<strong>and</strong>box<br />

<strong>and</strong> the loaded movie clip is from a network s<strong>and</strong>box.<br />

■ Loading is not allowed if the calling SWF file is in a network s<strong>and</strong>box <strong>and</strong> the movie clip<br />

to be loaded is local.<br />

Global Functions 71

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

Saved successfully!

Ooh no, something went wrong!