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

Create successful ePaper yourself

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

start_button.clickH<strong>and</strong>ler = function() {<br />

trace("Starting...");<br />

start_button.enabled = false;<br />

stop_button.enabled = true;<br />

//<br />

image_mcl.addListener(mclListener);<br />

image_mcl.loadClip("http://www.helpexamples.com/flash/images/<br />

image1.jpg", image_mc);<br />

};<br />

stop_button.clickH<strong>and</strong>ler = function() {<br />

trace("Stopping...");<br />

start_button.enabled = true;<br />

stop_button.enabled = false;<br />

//<br />

image_mcl.removeListener(mclListener);<br />

};<br />

stop_button.enabled = false;<br />

See also<br />

addListener (MovieClipLoader.addListener method)<br />

unloadClip (MovieClipLoader.unloadClip method)<br />

public unloadClip(target:Object) : Boolean<br />

Removes a movie clip that was loaded by means of MovieClipLoader.loadClip(). If you<br />

call this method while a movie is loading, MovieClipLoader.onLoadError is invoked.<br />

Parameters<br />

target:Object - The string or integer passed to the corresponding call to<br />

my_mcl.loadClip().<br />

Returns<br />

Boolean -<br />

Example<br />

The following example loads an image into a movie clip called image_mc. If you click the<br />

movie clip, the movie clip is removed <strong>and</strong> information is displayed in the Output panel.<br />

this.createEmptyMovieClip("image_mc", this.getNextHighestDepth());<br />

var mclListener:Object = new Object();<br />

mclListener.onLoadInit = function(target_mc:MovieClip) {<br />

target_mc._x = 100;<br />

target_mc._y = 100;<br />

target_mc.onRelease = function() {<br />

trace("Unloading clip...");<br />

MovieClipLoader 495

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

Saved successfully!

Ooh no, something went wrong!