03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - 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.

triangle_mc.lineTo(100, 300);<br />

triangle_mc.lineTo(200, 200);<br />

triangle_mc.endFill();<br />

See also<br />

beginFill (MovieClip.beginFill method), createEmptyMovieClip<br />

(MovieClip.createEmptyMovieClip method), endFill (MovieClip.endFill method),<br />

lineStyle (MovieClip.lineStyle method), moveTo (MovieClip.moveTo method)<br />

loadMovie (MovieClip.loadMovie method)<br />

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

Loads SWF or JPEG files into a movie clip in Flash Player while the original SWF file is<br />

playing.<br />

Tip: To monitor the progress of the download, use the MovieClipLoader.loadClip()<br />

method instead of the loadMovie() method.<br />

Without the loadMovie() method, Flash Player displays a single SWF file <strong>and</strong> then closes.<br />

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

files without loading another HTML document.<br />

A SWF file or image loaded into a movie clip inherits the position, rotation, <strong>and</strong> scale<br />

properties of the movie clip. You can use the target path of the movie clip to target the loaded<br />

SWF file.<br />

When you call the loadMovie() method, set the MovieClip._lockroot property to true in<br />

the loader movie, as shown in the following code example. If you don't set _lockroot to<br />

true in the loader movie, any references to _root in the loaded movie point to the _root of<br />

the loader instead of the _root of the loaded movie.<br />

myMovieClip._lockroot = true;<br />

Use the MovieClip.unloadMovie() method to remove SWF files or images loaded with the<br />

loadMovie() method.<br />

Use the MovieClip.loadVariables() method, the XML object, Flash Remoting, or Runtime<br />

Shared Objects to keep the active SWF file <strong>and</strong> load new data into it.<br />

Using event h<strong>and</strong>lers with MovieClip.loadMovie() can be unpredictable. If you attach an<br />

event h<strong>and</strong>ler to a button by using on(), or if you create a dynamic h<strong>and</strong>ler by using an event<br />

h<strong>and</strong>ler method such as MovieClip.onPress, <strong>and</strong> then you call loadMovie(), the event<br />

h<strong>and</strong>ler does not remain after the new content is loaded. However, if you attach an event<br />

h<strong>and</strong>ler to a movie clip by using onClipEvent() or on(), <strong>and</strong> then call loadMovie() on that<br />

movie clip, the event h<strong>and</strong>ler remains after the new content is loaded.<br />

MovieClip 441

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

Saved successfully!

Ooh no, something went wrong!